Digitizer tool - online Google maps tool |
|
|
This application uses Google Maps API version 2. The same tool with Version 3 is here.
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. It is also a marker tool. 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.
I find my tool easier to use, with the options I need, than the Google Maps MyMaps creation tool - http://maps.google.com.
The OpenStreetMap map type has been added to the Google Maps map types. It has been embedded as a layer within the Google Map. This will in many parts of the world give you map tiles with more details than the default Google Maps tiles.
The two examples below show polygons from KML files created with this application.
Southern Cassowary distribution
Little Spotted Kiwi distribution
You may draw paths, routes, directions with this application. Choose Combinations in Draw mode. One of the options there use GDirections.
If a coastline is part of the shape you want to create, you may use templates and build on them
Build Google maps polylines and polygons from templates
The V2 feature enableEditing now exists for V3. But it lacks 'Click to remove'. It is possible to build the feature for V3 with some javascript.
I have posted an example here:
Enable editing in V3
And for editing - if you have a kml file uploaded on a server, and you want to edit its coordinates, you may use this tool Edit tool for Google maps polyline and polygon
Here are some other tools and helpers I have made
| Large map tool | Marker tool, KML, coordinates | |
| Edit Google Maps KML file | Custom overlay for Google Maps | |
| Google Maps API v3 tool | Reading a KML file |
The "Holes" feature ("donuts", "islands"), draw a polygon with holes, is easy with KML code. But
I needed the Google Maps API JavaScript to present it on the map with this application. This is done with
"new GPolygon.fromEncoded". It could, however, be done like this: 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. Then use "new GPolygon" to create the polygon. But there will be a line from the outer outline to the inner
outline on the map. To avoid this, I now use "new GPolygon.fromEncoded" to present polygons with holes
on the map. To do the encoding, I use PolylineEncoder.js provided by
Mark McClure.
Choose Code text Javascript when you have finished a polygon with hole if you want to see
the javascript for "new GPolygon.fromEncoded".
To draw a polygon with a hole with this application: Click "Holes" and follow the instructions.
Draw a closed shape in Polyline draw mode. 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 was 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
Problem description
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.
Update
5. January 2010: There is a message in the google thread above that the bug has been fixed.
I have changed the code in my application. There is no special treatment for IE8 now in the code.
| width="31" height="31" border="0" alt="Home"> |
|
Contact: googlemapstool@birdtheme.org |