We have been using Maps in our desktop applications for a long time. We have used several different mapping solutions depending on the needs of the application ranging from special Law Enforcement maps to simple standard maps.
For some projects we used Microsoft MapPoint. MapPoint was a nice mapping solution that provided a nice COM Interface, had local maps, did routing and had a simple licensing model
MapPoint was discontinued and we had to find a different solution for our desktop applications. We also needed a solution for web applications as well as native mobile apps for iOS, Windows Universal and Android.
Looking at different mapping solutions we started using several different solutions for our projects. Partly because of features but also because of licensing. Some mapping solutions provide free licensing for certain uses, some have a simple commercial licensing scheme, etc.
For DataFlex WebApp we built a mapping library that currently consists of the following 3 mapping solutions
Static MapQuest Maps
MapQuest provices an interface to retrieve static map images based on location with added markers, etc. These maps are static images that can be used for example in reporting and similar areas were a dynamic map is not needed.
The mapping data is provided by Mapquest and there is a limited number of free transactions and after that a decent commercial use licensing structure.
Dynamic Leaflet based Maps
Leaflet is a generic JavaScript mapping API that allows us to use maps from different providers. Leaflet maps are fully dynamic and the API comes with a large number of features.
Leaflet maps can be used with OpenStreetMaps, a free mapping provider or can also be used with MapQuest maps.
Google Maps
We also added a class to support Google Maps in your DataFlex WebApp projects
Here is a simple example on showing a map in Google Maps
Object oMap is a cszGoogleMap // set zoom level Set piZoom to 16 End_Object Object oShowLatLonBtn is a cWebButton Set psCaption to "Show Lat/Lon" Procedure OnClick WebSet psLongitude of oMap to -80.243073 WebSet psLatitude of oMap to 27.146106 Send RequestShowMapLatLon to oMap End_Procedure End_Object
Another example calculating a route using Leaflet based Maps with MapQuest data
Object oMap is a cszGoogleMap // set zoom level Set piZoom to 16 End_Object Object oShowLatLonBtn is a cWebButton Set psCaption to "Show Lat/Lon" Procedure OnClick WebSet psLongitude of oMap to "-80.200886" WebSet psLatitude of oMap to "27.202678" Send ClearRouteLocations to oMap Send AddLocation to oMap 'Miami, FL' 'Miami, FL' Send AddLocation to oMap 'Ft Lauderdale, FL' 'Ft Lauderdale, FL' Send AddLocation to oMap "4765 SE Chiles CT, Florida" "Haunted Mansion" Send RequestShowMapRoute to oMap End_Procedure End_Object
here is what this looks like in a webapp
This among other controls are available at StarZen Technologies, Inc