A few days ago Google made their “My Maps” announcment and since then there has been nothing but buzz buzz buzz about it. So I figured I would take a minute to show how someone can use this new tool from Google to create their own embedded maps for their site.
The first step is to create your new map. Go to Google Maps and click on the new “My Maps” tab.
Now you create your map. You can create polygons, lines or just points and include whatever you want in the descriptions because it will all be included in the KML.
Once you have completed your map you want to go to click on the KML link at the top right to save the KML for this map to disk.
Just last month Google added support for KML overlays to their map API. It isn’t very well documented on the GGeoXml documentation page but there is only one real issue you have to know about. The main thing to understand is that the KML file must sit on a public webserver somewhere and when you reference it Google needs to be able to access it. For example if you are testing on your local box and you put something like “http://localhost/mykml.kml” in for the URL it will not work. After you get past that the path to using your saved KML file is easy. Here is a full example:
Notice that you have to zoom and center to somewhere since that isn’t controled by the KML file but other than that it makes creating embedded maps very simple.
And here are the results from the example: