This is the tool I use to create overlays for my Google API maps. I use it to draw polyline,
polygon, circle and polygon with hole on my Google map. In the drawing process I may delete and edit points and lines. Style management
is available with the 'Style options' button. Polygon colour, line colour, line thicknes, opacity may be changed.
The coordinates for the overlay are written inside KML text, ready to be
copied and saved in a KML file. I can also choose to let the tool present only the KML coordinates,
without the KML elements. And I can also switch to the Google Maps API JavaScript code for the overlay.
The map registers mousemove and presents the coordinates of the mouse position.
Zoom level is shown when zoom is changed.
Examples of my use of Google Maps API with KML
Southern Cassowary distribution
Little Spotted Kiwi distribution
The javascript and the layout for this web page is a modified version of EZ Google Maps Digitizer, Read about it in Google Code Articles. Maths for drawing circle Some experiments with the Google Maps API (Sensitive circle).
When I want to work with a smaller map, I
use this
When I want to change or add coordinates in a kml-file, I use this tool:
Edit Google Maps KML file
And, when I want to attach an image or a text label to my map, I use my custom overlay tool:
Custom overlay for Google Maps
What about Version 3?
Google Maps API v3 tool
The "Hole" feature, draw a polygon with a hole, is mine. I knew how to do this with KML code. But I needed the Google Maps API JavaScript to present it on the map. With a web search I found how to do it with "new GPolygon.fromEncoded". This is unnecessary complicated for my application. I wanted to do it with "new GPolygon". The solution is simple. This is a description of what the code does: Get the coordinates for the outer boundary points. Get the coordinates for the inner boundary points - the hole. Join the coordinates - append the inner points coordinates to the end of the outer points coordinates. To draw a polygon with a hole with this application: Draw a closed shape first. Then mark Hole and draw a (closed) shape within (if you want a hole, but it is possible to draw the second shape outside or overlapping). Choose Polygon draw mode to view the result.
The Google Maps API is not compatible with IE8. This has been filed as a bug in
http://code.google.com/p/gmaps-api-issues/issues/detail?id=1055
and
http://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=362142
The problem is that the 'click' event in Google Maps API do not behave in IE8 the way it does in other
browsers. There are workarounds. The 'mousemove' event in Google Maps API returns the correct
position in IE8. In this application I register the mouse position when the map is clicked and use
that instead of the clicked position. Thus, IE8 works fine with my google maps tool.