How To Use Google Maps for Windows Mobile from your Satellite Forms application
Previous Topic  Next Topic 

Problem:        How To Use Google Maps for Windows Mobile from your Satellite Forms application


Solution:        This article describes how to have your Satellite Forms application for Windows Mobile launch Google Maps with a specific destination (address or landmark or GPS lat/lon position), business search, or route request!


This method lets you show the desired location in Google Maps Mobile for WM (let's call it GM for short), and be able to have live interaction to move around, zoom, etc., just as if you had started GM manually.  Your app stays running in the background, so when you close GM, your app returns to the foreground.


The techniques described here are demonstrated in the sample project GoogleMaps, in the PocketPC target, included with Satellite Forms 8. That sample also demonstrates the GoogleMaps extension for Palm OS, which provides similar features.


The key to using GM from your Satellite Forms Windows Mobile app is to launch GM with a specially formatted commandline that tells it to show a location, search for a business, or plot a route.


1. Launch GM using the SU_LaunchApp function in the SysUtils extension, providing the full path to the GoogleMaps.exe program in the strPath parameter, normally: \Program Files\GoogleMaps\GoogleMaps.exe


2. Pass the special commandline parameters for the location, business search, or route in the strParam parameter.  The parameter string you pass should take this form:


Maps Usage Type

Parameter Format

Example

Location

-URL "?action=locn&a=[location]"

-URL "?action=locn&a=1 Microsoft Way Redmond WA"

Business Search

-URL "?action=busi&q=[search]"

-URL "?action=busi&q=pizza near wall st new york ny"

Route Request

-URL "?action=rout&start=[place]

&end=[place]"

-URL "?action=rout&start=Vancouver BC&end=@latlon:50.34,-112.23"

View mode [optional]

&view=[mapv|satv]

&view=mapv for map view mode, &view=satv for satellite view mode


The parameter string includes several parts.


A. To show a Location, use these guidelines:


       ?action=locn



       &a=1 Microsoft Way Redmond WA







       &view=mapv                specifies map view


       &view=satv                specifies satellite view




B. To search Google Maps for businesses, use these guidelines:


       ?action=busi



       &q=pizza near wall st new york ny






C. To show a Route between two points, use these guidelines:


       ?action=rout



       &start=Vancouver BC&end=Whistler BC







D. General tips:




       dim strParam

       strParam "-URL " &chr(34) &"?action=locn&a=Vancouver BC" &chr(34)





Keywords:      Google Maps, map, satellite, route, directions, search, business


KB ID: 10088 

Updated: 2010-06-22


Satellite Forms KnowledgeBase Online

Satellite Forms Website Home