Hi, thanks. It is working now with this code:
line = new GPolyline([point1], color, 3, 9);
map.addOverlay(line);
line.enableDrawing(options);
GEvent.addListener(line, "endline", function() {
//var cells = "330000";
GEvent.bind(line, "lineupdated", cells.desc, onUpdate);
GEvent.addListener(line, "click", function(latlng, index) {
if (typeof index == "number") {
line.deleteVertex(index);
} else {
}
});
});
But my new problem is now, to include this code in this one:
http://google-maps-api.googlegroups.com/web/GCircle.js?gsc=dpN0vQsAAABU4p2ENAuuRyvBkVxCNbLf
Do you have an idea?
On 31 Mai, 00:51, Rossko <[email protected]> wrote:
> > Well, i have tried the function enableDrawing() and enableEditing()as
> > well, but it
> > didn't work.
>
> You haven't shown us that.
> It does work in the example you refer to.
>
> > Sorry but are you sure, that it wont work with the vertex functions?
>
> No, I expect it could be made to work ... but ...
> What is this doing?
> for(var i = 1; i < line.length ; i++){
> line[i] = 0;
> 'line' was previously defined as a GPolyline object ; it is not a
> simple array. I don't think GPolylines have a .length property, so
> that probably saves it being destroyed by the next line.
>
> line.length is not the same as line.getVertexCount()
> http://code.google.com/apis/maps/documentation/javascript/v2/referenc...
> line[i] is not the same as line.getVertex(i)
> http://code.google.com/apis/maps/documentation/javascript/v2/referenc...
> You can't just make the syntax up.
>
> Have you seen
> this?http://web3o.blogspot.com/2010/05/google-maps-dynamically-movable-and...
> or this?http://www.admaps.com/dragpoly.htm
> orhttp://maps.forum.nu/gm_drag_polygon.html
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.