Unable to get coordinates from bing map REST api -
we have list of address, , trying coordinates of them using server side script.
due limitation of google map api(2500 query per 24 hour), move bing map rest api.
but when calling api not giving coordinates, while google map api returning correct coordinates. please tell me doing wrong?
here sample call
http://dev.virtualearth.net/rest/v1/locations?query=a+beka+acadamdy,2303+maravilla,lompoc,ca,93436,&incl=queryparse&key=my_api_key
if replace %20 in address still not returning data
http://dev.virtualearth.net/rest/v1/locations?query=a%20beka%20acadamdy%202303%20maravilla%20lompoc%20ca%2093436&incl=queryparse&key=my_api_key
another url
http://dev.virtualearth.net/rest/v1/locations?query=103+black+men+of+the+bay+area+community,3403+malcolm+avenue,oakland,ca,94607-1407,&incl=queryparse&key=my_api_key
we tried this
https://msdn.microsoft.com/en-us/library/ff817004.aspx#sectiontoggle6
but don't know country, that's why not working correctly.
a couple of things change. first, drop name of location, need street address.
so geocoding "2303 maravilla, lompoc, ca, 93436" work.
secondly, looks escaping query value rather encoding it. escaping isn't encoding , result in queries failing together. example if query had "first & main" in it, escaping not escape ampersand make after new url parameter either cause error or mean query "first". encoding ampersand changed %26. documented in best practices here: https://msdn.microsoft.com/en-us/library/dn894107.aspx
by encoding query parameter address this:
"2303%20maravilla,%20lompoc,%20ca,%2093436"
Comments
Post a Comment