Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Geolocation
Message
 
To
24/10/2018 10:32:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01662773
Message ID:
01662779
Views:
70
>Hello all,
>
>I'd like to have all the code or sites you can give me that will show me how to process information related to geolocation.
>
>For example, let's say I have informations that will change depending on the geolocation. the information will make sense to people that are within a 5 miles distance. Can I have code that will tell me that someone is in wich spot so I can give that person the right information.
>
>Can I have code that will tell me where I am (longitude and latitude)?
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 lcResponse
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform