Question about Reverse Geo-Coding
-
Thursday, March 01, 2012 3:17 AM
Why doesn't feeding the map API the same lat/long it returned to me return any results?
Find a location by address query:
http://dev.virtualearth.net/rest/v1/Locations?q=90254+United+States&key=xxxxx&o=xml
Response:
<?xml version="1.0" encoding="utf-8" ?> - <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/search/local/ws/rest/v1"> <Copyright>Copyright © 2012 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.</Copyright> <BrandLogoUri>http://dev.virtualearth.net/Branding/logo_powered_by.png</BrandLogoUri> <StatusCode>200</StatusCode> <StatusDescription>OK</StatusDescription> <AuthenticationResultCode>ValidCredentials</AuthenticationResultCode> <TraceId>xxxxx</TraceId> - <ResourceSets> - <ResourceSet> <EstimatedTotal>1</EstimatedTotal> - <Resources> - <Location> <Name>90254, CA</Name> - <Point> <Latitude>33.866390228271484</Latitude> <Longitude>-118.39595031738281</Longitude> </Point> - <BoundingBox> <SouthLatitude>33.851882934570312</SouthLatitude> <WestLongitude>-118.40950012207031</WestLongitude> <NorthLatitude>33.877716064453125</NorthLatitude> <EastLongitude>-118.38485717773438</EastLongitude> </BoundingBox> <EntityType>Postcode1</EntityType> - <Address> <AdminDistrict>CA</AdminDistrict> <AdminDistrict2>Los Angeles Co.</AdminDistrict2> <CountryRegion>United States</CountryRegion> <FormattedAddress>90254, CA</FormattedAddress> <Locality>Hermosa Beach</Locality> <PostalCode>90254</PostalCode> </Address> <Confidence>High</Confidence> <MatchCode>Good</MatchCode> - <GeocodePoint> <Latitude>33.866390228271484</Latitude> <Longitude>-118.39595031738281</Longitude> <CalculationMethod>Rooftop</CalculationMethod> <UsageType>Display</UsageType> </GeocodePoint> </Location> </Resources> </ResourceSet> </ResourceSets> </Response>
Find a location by point query:
http://dev.virtualearth.net/rest/v1/Locations/Point/33.866390228271484,-118.39595031738281?includeEntityTypes=Postcode1&key=xxxxx&o=xml
Response:
<?xml version="1.0" encoding="utf-8" ?> - <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/search/local/ws/rest/v1"> <Copyright>Copyright © 2012 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.</Copyright> <BrandLogoUri>http://dev.virtualearth.net/Branding/logo_powered_by.png</BrandLogoUri> <StatusCode>200</StatusCode> <StatusDescription>OK</StatusDescription> <AuthenticationResultCode>ValidCredentials</AuthenticationResultCode> <TraceId>xxxxx</TraceId> - <ResourceSets> - <ResourceSet> <EstimatedTotal>0</EstimatedTotal> <Resources /> </ResourceSet> </ResourceSets> </Response>
Am I doing something wrong or is this some limitation of the system?Hal Hunt
- Moved by Richard_BrundrittMicrosoft Employee, Owner Friday, March 16, 2012 6:40 PM (From:Bing Maps: Map Control and Web services Development)
All Replies
-
Thursday, March 01, 2012 5:32 AMOwner
The issue is with your URL. YOu are not supposed to include the Point subdirectory. Here is the corrected URL: http://dev.virtualearth.net/rest/v1/Locations/33.866390228271484,-118.39595031738281?includeEntityTypes=Postcode1&key=xxxxx&o=xml
http://rbrundritt.wordpress.com
- Marked As Answer by Richard_BrundrittMicrosoft Employee, Owner Saturday, March 10, 2012 2:03 PM

