Search code examples
c#google-maps-api-3windows-phone-8bing-maps

Is there a way to get the hospitals near me,using the radius using bing maps?


I'm developing a wp8 app and i need to know how to get the hospitals near me using the bing maps api, or if its not possible, maybe using another api

hope someone can help me thanks


Solution

  • i found the solution using the google places api, and installing on the project solution the nugget package of httpClient, you can do this on the next link,

    https://www.nuget.org/packages/Microsoft.Net.Http

    and the final code is in here

    HttpClient client = new HttpClient();
    
    string baseUrl = "https://maps.googleapis.com/maps/api/place/search/json?key=YourkeyHere&location=" + lat + "," + lon + "&radius=5000&keyword=hospital&sensor=true";
    
    string googleResult = await client.GetStringAsync(baseUrl);
    

    the final result is an string that has to be Deserialized from json to an object, there are many way to do this, so you can choose your own path, thanks every one for their help but this is, what i was looking for and i hope that this solution, can help someone