Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Directions for google map with lat and long values
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01417187
Message ID:
01417290
Views:
60
Thanks Sergey

I had a brower control on a from and using the following code.
lnEmployeeLat = 40.809491
lnEmployeeLong = -74.007731
lnClientLat = 41.728390
lnClientLong = -72.841476
lcClientName = '(Client Name)'
lcEmployeeName = '(Employee Name)'

lcEmployeLatLongPre = 'saddr='
lcClientLatLongPre = '&daddr='

lcEmployeeLat = ALLTRIM(STR(lnEmployeeLat))
lcEmployeeLong = ALLTRIM(STR(lnEmployeeLong))
lcClientLat = ALLTRIM(STR(lnClientLat,12,6))
lcClientLong = ALLTRIM(STR(lnClientLong,12,6))

this.browser.navigate('http://maps.google.com/maps?'+;
								lcEmployeLatLongPre+lcEmployeeLat+','+;
								lcEmployeeLong+ ;
								lcEmployeeName+;
								lcClientLatLongPre+;
								lcClientLat+','+;
								lcClientLong +;
								lcClientName)
but failed to notice that taking the str function was returning an integer so added to allow for decimal places.
lcEmployeeLat = ALLTRIM(STR(lnEmployeeLat,12,6))
lcEmployeeLong = ALLTRIM(STR(lnEmployeeLong,12,6))
Thanks

Ron


>You can put the comma separated latitude and longitude values into daddr, saddr or both.
>
>http://maps.google.com/maps?saddr=Farmington,CT&daddr=40.809491,-74.007731
>
>
>>I am able to get directions from Google using address names, but for the life of me can not get it to work with latitude and longitude values.
>>
>>Can anyone share what the code should look like?
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform