[OpenLayers-Users] Capture Events
Diego Roberto
diegorrborges at yahoo.com.br
Sun Sep 27 23:23:35 EDT 2009
I
need to capture an event after drawing a polygon on the map. At the
User map enables the control to draw a polygon on the map and the final
design of the desire to capture the coordinates of this polygon to
generate a search space. I can not make it through an event.
Currently I use a search button that has a onclick function that calls for the following item caught the coordinates:
var strPoligono = geojson.write (poligono.features, true);
Now how to make it through when it finishes drawing the polygon ta
screen? I tried using the onClick function but without success:
onClick: function (evt) (
/ / Capture the screen coordinates
var strPoligono = geojson.write (poligono.features, true);
/ / Capture the zoom level of the map
nivelZoom map.getZoom = ();
/ / Call the function as parameter is the level of zoom and the coordinates
query (strPoligono, nivelZoom);
)
I also tried with no success onDblclickporém:
ondblclick: function (evt) (
/ / Capture the screen coordinates
var strPoligono = geojson.write (poligono.features, true);
/ / Capture the zoom level of the map
nivelZoom map.getZoom = ();
/ / Call the function as parameter is the level of zoom and the coordinates
query (strPoligono, nivelZoom);
)
I use the following layer:
/ / Layer to design for polygon generation of space research
polygon = new OpenLayers.Layer.Vector ( 'Search Polygon',
/ / Blue Style applied to the polygon
(
Style: OpenLayers.StyleMap new ((
fillColor: "# 333399"
fillOpacity: 0.5
))
)
);
Can anyone help me?
Thank you for your attention. Have a great week.
--
________________________________________________
Diego Roberto
+ 55 (62) 9619-0902
"Run after your dream ... They are the only thing you care even when you're sleeping!"
________________________________________________
____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090927/7ccb9291/attachment.html
More information about the Users
mailing list