Reputation: 5264
I have an address which shows correct correct place in bingmap. When I request geo code for same address using Unstructured URL API, it sends different geo location
address: 86 Oakleaf Dr Meadow Valley, CA 95956
when I request through bing map api
It result somewhere here
am I missing anything in API request? (I have valid bing key)
Upvotes: 0
Views: 174
Reputation: 5264
I changed API calling Find a Location by Address to Find a Location by Query and it sends same geo location which when we search address in bingmap website.
No other solution I could found in Find a Location by Address API.
var url = "https://dev.virtualearth.net/REST/v1/Locations?query="
+ encodeURIComponent('Oakleaf Dr Meadow Valley CA 95956 United States')
+ "&incl=queryParse"
+ "&output=json"
+ "&key=" + BingmapKey
Upvotes: 0
Reputation: 1859
https://dev.virtualearth.net/REST/v1/Locations?CountryRegion=us&adminDistrict=CA&locality=Meadow%20Valley&postalCode=95956&addressLine=86%20Oakleaf%20Dr.&output=json&key=BingMapsKey
What you have seems right, I just added a period after the 'Dr' and it changed it to the correct location you wanted.
Upvotes: 0