Hi,

in order to show coords in textarea try:

 GEvent.addListener(poly, "endline", function() {
  for (var i=0; i<poly.getVertexCount(); i++) {
   var vertex = poly.getVertex(i);
   document.getElementById('textarea').innerHTML += vertex.lat()+',
'+vertex.lng()+"\n";
  }
 });

 GEvent.addListener(poly, "lineupdated", function() {
  for (var i=0; i<poly.getVertexCount(); i++) {
   var vertex = poly.getVertex(i);
   document.getElementById('textarea').innerHTML += vertex.lat()+',
'+vertex.lng()+"\n";
  }
 });


On 27 Sty, 14:50, xnisaj <[email protected]> wrote:
> Hi!
> Athttp://googlemapsapi.blogspot.com/2008/05/love-my-maps-use-its-line-a...
> , Keith Golden show how allow user to draw some shapes on maps. Can
> someone help me with one question... I would like to modify this
> example:
>
> How to show (for example in <TEXTAREA>) vertex coords of shapes.
> How to add an RESET button to clear all map from shapes.
> How to allow user to draw only one shape.
>
> and last... is there any possibility to prevent user to draw shapes on
> roads?

-- 
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.

Reply via email to