I recently upgraded a simple simple Google Map that I built last spring to display some of the cross country skiing around Boulder. You can see the original version here. I built this based on this XML.com article, using XMLHttpRequest to retrieve the data from the server and
Gmarker.openInfoWindoXSLT() with this XSL stylesheet to present the data.
I decided to upgrade this map last week to version two. Since
openInfoWindowXSLT is no longer supported on every browser, I feared that the upgrade would take significant effort, even though the map very simple. However, the upgrade ended up being easier than I thought it would be. To get started, I read the Google Upgrade Guide–this document explains just what changes were made in the API. The changes that affected my map included:
- A few method name changes–
GPointis no longer used to indicate a latitude and longitude location on a map, and its replacement,
GLatLng, reverses the order of the constructor’s arguments.
- Zoom levels are flipped around, with larger numbers now signifying higher resolutions
Upgrading my (admittedly very simple map) took about 1.5 hours. Visit the new map and take a look at the code.
Technorati Tags: google maps upgrade