Getting Location Name from Longitude and Latitude in BingMap

后端 未结 3 1396
故里飘歌
故里飘歌 2021-01-07 15:15

I am a WP7 developer. I have longitude and latitude of a location. Is there anyway to get the info the location defined by the coordinate ie longitude and latitude. Thank yo

3条回答
  •  孤独总比滥情好
    2021-01-07 15:56

    Yes, you can do this via the Bing Maps REST API, you need to perform a reverse geocode. This is done by GET-ing the following request:

    http://dev.virtualearth.net/REST/v1/Locations/47.64054,-122.12934?o=xml&key=BingMapsKey
    

    Which will return the address in XML format:

    
      
        Copyright © 2011 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.
      
      
        http://dev.virtualearth.net/Branding/logo_powered_by.png
      
      200
      OK
      ValidCredentials
      
        dd31ffaf098f4406b7ecdd0da36680ff
      
      
        
          1
          
            
              1 Microsoft Way, Redmond, WA 98052
              
                47.640568390488625
                -122.1293731033802
              
              
                47.636705672917948
                -122.137016420622
                47.6444311080593
                -122.1217297861384
              
              Address
              
    1 Microsoft Way WA King Co. United States 1 Microsoft Way, Redmond, WA 98052 Redmond 98052
    Medium Good 47.640568390488625 -122.1293731033802 Interpolation Display Route

提交回复
热议问题