Procedure getGps(tcAddress,tcCity,tcState,tcZip,tcCountry) > *+++++++++ *** Changed 2015/02/14 new way of getting GPS coordinates, more accurate ++++++++++++++++++++ > xhrRequest= Createobject("Msxml2.ServerXMLHTTP") > sQuery = "http://dev.virtualearth.net/REST/v1/Locations?CountryRegion=[tcCountry]&adminDistrict=[tcState]&locality=[tcCity]&postalCode=[tcZip]&addressLine=[tcAddress]&key=Ak3N0GxiMfdssziGDmDvJW3F0Zwo59dop-Q0st6eRNNmCw2Wuvn0RNb3EOg82WlR" > sQuery = Strtran(sQuery,'[tcCountry]',tcCountry) > sQuery = Strtran(sQuery,'[tcState]',tcState) > sQuery = Strtran(sQuery,'[tcCity]',tcCity) > sQuery = Strtran(sQuery,'[tcZip]',tcZip) > sQuery = Strtran(sQuery,'[tcAddress]',tcAddress) > *sQuery = Strtran(sQuery,'[BING_MAP_KEY]',BING_MAP_KEY) > xhrRequest.Open ("GET", sQuery, .F.) > xhrRequest.Send() > oXML=Createobject('msxml.domdocument') > oXML.LoadXML(xhrRequest.ResponseText) > lcResponse = xhrRequest.ResponseText > Return lcResponseThe "[BING_MAP_KEY]" is apparently already expanded in the initial sQuery string, so that line is not needed.
&key=Ak3N0GxiMfdssziGDmDvJW3F0Zwo59dop-Q0st6eRNNmCw2Wuvn0RNb3EOg82WlR
It also looks like to parse the return you're looking for "coordinates" and then the text between "[" and "]" after that. It looks like this in general form:{"type":"Point","coordinates":[0.000000,0.000000]}