When you have an image you want to place on a Google map, the information you usually have is it's width and height in pixels. With this information and this tool, you will get the result you want. This tool works fine to create text labels as well. A scaled overlay will change size as the zoom level changes. A fixed overlay will stay same size at all zoom levels.
You may attach more than one overlay to this map, but be sure to copy code before you move on to next overlay. Last created overlay may always be removed.
This tool will give you the javascript code you need. But there is one more important thing. You also need the code for the javascript class MyCustomOverlay. This class inherits from the Google maps API class GOverlay. I have written MyCustomOverlay based on and copied from ProjectedOverlay (John Coryat), EInsert (Mike Williams) and ELabel (Mike Williams).
Images and text labels attached to the map with this tool, will move with the map. If you want them to stay fixed in the
map viewport, you may sub-class the Google Maps control object GControl. Here is the address for a tool for this:
HtmlControl, by Martin Pearman
Here is an example of how I use MyCustomOverlay.
Tinamous
And here is my tool for polygons and polylines.
Digitizer tool
Download MyCustomOverlay from here mycustomoverlay.js
Functionality for show and hide overlay is included in the script.
| width="31" height="31" border="0" alt="Home"> | Contact: googlemapstool@birdtheme.org |