Reputation: 145
I am trying to develop a windows phone 8.1 application.(not silverlight). I need to locate my current location and also nearest location. (i.e geographic points of interest within a given proximity (e.g. 10km) filtered by category, such as "restaurants","petrol bunks","hotels" etc.)
With the help of BingMapsTask we can do it in silverlight applications. So coming to wp8.1 I tried using launch uri. But I cannot get the current location and nearby selected category with this uri
await Windows.System.Launcher.LaunchUriAsync(new Uri("bingmaps:?lvl=10&where=restaurants", UriKind.Absolute));
How to get the current nearby list of places
Upvotes: 0
Views: 453
Reputation: 601
First get the current Position using "GetGeopositionAsync" function. Then try it using the coordinates that you received.
Example for the URI: "bingmaps:?cp=40.726966~-74.006076&lvl=10&where=New%20York"
Also note that the GetGeopositionAsync function would take time so "await" it till you get the result. Use try-catch to check if phone GPS/location is turned ON or not.
Upvote if this works
Cheers
Upvotes: 1