Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing gps coordinates from google maps into vfp table
Message
From
20/12/2015 11:17:13
 
 
To
20/12/2015 05:38:57
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01629101
Message ID:
01629156
Views:
145
Here is solution.

somewhere in BODY section I put listener to read gps coordinates on right click

google.maps.event.addListener(map, "rightclick", function(event)
{
var lat = event.latLng.lat();
var lng = event.latLng.lng();
// populate yor box/field with lat, lng mayby some other fieds you need for location, perhaps create marker

var StoreToFile= "lat"+lat+"#"+"long"+lng

WriteToFile(StoreToFile)
}
);

At the end of SCRIPT section

function WriteToFile(sText)
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var FileObject = fso.OpenTextFile("C:\\tmp\\LogFile.txt", 8, true,0); // 8=append, true=create if not exist, 0 = ASCII
FileObject.writeline(sText)
FileObject.close()
}


Voila, now I can manipulate with data in my logfile.txt

Thanks for all replies.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform