Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web services in VFP
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01609680
Message ID:
01609696
Views:
99
My recommendation would be to use a web browser control and create a Google Maps application. You can do all sorts of cool stuff with this - the maps api can be almost entirely automated via URLs. If you just need mapping between two locations you can use simple query string parameters on a URL to show a map with directions between two locations. Better if you have GPS coordinates as then there's no confusion over the location.

For example try:
https://www.google.com/maps/dir/20.9179082,-156.3761248/20.800816,-156.342712/@20.8584916,-156.4513689,12z/data=!3m1!4b1

which are two locations by gps coordinates and they just show up.

Or with addresses:

https://www.google.com/maps/dir/?saddr=32%20Kaiea%20Place,%20Paia&daddr=20%20hana%20Hwy

but addresses can be ambiguous which can cause a few problems.

If you stick the map into a Web Browser control and drive it via code it's pretty easy to build an interactive map application.

You can also completely automate the map handling with code using the Google Maps API. Some you can do via URLs, but for more advanced things you'll need to use the Google Maps JavaScript API. Additionally they also have a very rich REST API that you can access via HTTP to retrieve places information (what's around a location) and doing GeoLocation lookups (gps coords to addresses and vice versa).

Using URLs is free AFAICT, but if you use the Maps API there are some (reasonable) restrictions for usage.

I recently built a reasonably involved sample app at GeoCrumbs.net which puts a whole bunch of this stuff to use in a customize Web application. It works reasonably well including on mobile devices - you can make it as easy (simple URLs shown in the browser) or more complex (doing lookups figuring out current location etc.) using the API and anything in between.

Holler if you need more info or help.

+++ Rick ---

>Does anyone have any experience (or a thread number) with adding web services to VFP? I would like to be able to add map routing to a desktop app... Say I have a table with a few addresses in - it would be great to pop up a google map with all listed, and the quickest way between them. Anyone done anything like that. I bet you have!
>
>Many thanks!
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform