none
Perform geocoding and reverse geocoding using MapLocationFinderResult RRS feed

  • Question

  • Hi,

    I working on a UWP app. kind of perform geocoding and reverse geocoding using MapLocationFinderResult, is this MapLocationFinderResult is using Offline Map resource Or using Online Bing Maps resource? I tested turned off internet, the app still able to perform geocoding, from GPS to Address in realtime. Because this app always failed at Windows Store tester for some unexplainable reason, each time tester report show differ kind error result.

    Dim pointToReverseGeocode As New Geopoint(location)

    Dim result As MapLocationFinderResult = Await MapLocationFinder.FindLocationsAtAsync(pointToReverseGeocode)

    If using Windows.UI.Xaml.Controls.Maps, request a maps authentication key, it show a big warning message, right. I skip this one, not using it, too costly. Look for different solution.

    Thank You

    Friday, November 4, 2016 6:36 AM

Answers

  • Whether using the Map Control for UWP apps, or the Services under Windows.Services.Maps, you must obtain an authentication key. See the overview article here:

    https://msdn.microsoft.com/windows/uwp/maps-and-location/geocoding

    There are free tiers of service for limited use or non-commercial applications, see the descriptions on the bing maps portal site.

    In terms of your question, the geocoding and reverse geocoding services will use online results if you have a network connection, and offline results if you're not connected to a network. Offline includes potentially some cached data from when you were online, but will not be certain to work if you haven't explicitly cached the results (and even then will tend to return more limited results than when online since offline only caches a subset of all available geographic data).

    Friday, November 4, 2016 6:40 PM
    Moderator
  • To set your key, set the MapService.ServiceToken property as shown on this page:

    https://msdn.microsoft.com/windows/uwp/maps-and-location/authentication-key

    In order to make debugging and evaluation easier, both the control and the services will allow a limited number of calls to be made (the map control will display a helpful reminder, but there's no equivalent for the services).

    If you don't properly obtain a service token, the services may stop working without notice.

    Monday, November 7, 2016 9:13 PM
    Moderator

All replies

  • Whether using the Map Control for UWP apps, or the Services under Windows.Services.Maps, you must obtain an authentication key. See the overview article here:

    https://msdn.microsoft.com/windows/uwp/maps-and-location/geocoding

    There are free tiers of service for limited use or non-commercial applications, see the descriptions on the bing maps portal site.

    In terms of your question, the geocoding and reverse geocoding services will use online results if you have a network connection, and offline results if you're not connected to a network. Offline includes potentially some cached data from when you were online, but will not be certain to work if you haven't explicitly cached the results (and even then will tend to return more limited results than when online since offline only caches a subset of all available geographic data).

    Friday, November 4, 2016 6:40 PM
    Moderator
  • then why without the ServiceToken , the logic still able to perform the task success without error exception? Because i have installed Offline map?

    If look at this code below here, where should i add the ServiceToken ? or the ServiceToken only mainly for the Map Control? If Yes, then can i just let the user entered they own Bing Key, maps authentication key for the Map Control?
    Dim pointToReverseGeocode As New Geopoint(location) 
    
    Dim result As MapLocationFinderResult = Await MapLocationFinder.FindLocationsAtAsync(pointToReverseGeocode)


    • Edited by Han Ching Saturday, November 5, 2016 2:46 AM
    Saturday, November 5, 2016 2:39 AM
  • To set your key, set the MapService.ServiceToken property as shown on this page:

    https://msdn.microsoft.com/windows/uwp/maps-and-location/authentication-key

    In order to make debugging and evaluation easier, both the control and the services will allow a limited number of calls to be made (the map control will display a helpful reminder, but there's no equivalent for the services).

    If you don't properly obtain a service token, the services may stop working without notice.

    Monday, November 7, 2016 9:13 PM
    Moderator