Once we have located the user (via a client or server solution), we may want to display a map showing the user’s position, and/or a list of points of interest or other information superposed on the map.
To do this, we should use one of the available public maps APIs: Google Maps, Bing Maps from Microsoft, Yahoo! Maps, or OVI Maps from Nokia. However, if we analyze mobile compatibility, there is really only one choice: Google Maps. Compatibility for the others may increase in the future, but at present Google’s API is by far the best supported.
There are actually two Google APIs that are useful for mobile browsers: the Google Maps API v3 and the Google Maps Static API. The first one is the same service that we can find in any website using Google Maps. However, it is currently compatible only with iPhone and Android devices; on other devices, this API will not work properly. The Static API will allow us to show a static map compatible with any mobile browser.
Yahoo! APIs will be compatible if we use the Point of Interest (POI) search or even the geocoding services. Microsoft also offers Bing Maps Web Services with similar solutions.
If we are sure that the device is an iPhone or Android device, we should use the Google Maps API version 3, as shown in Figure 11-5.
Figure 11-5. Here we can see the Google Maps API on an iPhone showing the user’s current ...