loading
FullScreen Fecha y Hora: 28-Apr-2024 23:42 IP Pública: 3.21.76.0 Usuario: Público
27/Feb/2014 Editing polylines/polygons in maps api v3

Editing polylines/polygons in maps api v3

In maps api v2 we had the ability to enable editing on polylines and polygons. This allowed points on the object to be dragged, deleted etc, and also put draggable mid-points on the line, allowing entry of additional midpoints (and dragging of these).

The best simple example of this [v2] was the mymapstoolbar (emulating mymaps functionality)
http://gmaps-samples.googlecode.com/svn/trunk/poly/mymapstoolbar.html

So far, api v3 does not have enable editing method on any objects, but several people have had a go at replicating the functionality:

http://www.shanetomlinson.com/static/gmapV3EditablePolys/html/test.html
By Shane Tomlinson. Simple v3 version that allows markers on an existing polyline to be dragged, new points to be added, and line colour changed. Code posted in github

http://gmaps-samples-v3.googlecode.com/svn/trunk/poly/poly_edit.html
This one is for polygons only and allows point-drag and new points to be added, removed. It works by using an MVCarray to hold each point, and creates marker click listeners for click (remove point) and dragend (at point at this position), and map click listener to add a point.

http://nettique.free.fr/gmap/toolbar.html
An api v3 implementation of mymapstoolbar giving very similar look and usage

http://nettique.free.fr/maps/OpenLayersEditingToolbar.html
Similar edit toolbar for OpenLayers

http://ekelschot.eu/maps/enableEditing.html
And another, from peckham. code posted in snipplr

Tags: , ,

 
 

Ip Pública 3.21.76.0
Navegador Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
País United States
Ciudad Seattle