<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div><div id="result_box" dir="ltr">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. <br> Currently I use a search button that has a onclick function that calls for the following item caught the coordinates:
<br>
<br> var strPoligono = geojson.write (poligono.features, true);
<br>
<br> Now how to make it through when it finishes drawing the polygon ta
screen? I tried using the onClick function but without success: <br>
<br> onClick: function (evt) (
<br> / / Capture the screen coordinates
<br> var strPoligono = geojson.write (poligono.features, true);
<br> / / Capture the zoom level of the map
<br> nivelZoom map.getZoom = ();
<br> / / Call the function as parameter is the level of zoom and the coordinates
<br> query (strPoligono, nivelZoom);
<br>
<br> )
<br>
<br> I also tried with no success onDblclickporém:
<br>
<br> ondblclick: function (evt) (
<br> / / Capture the screen coordinates
<br> var strPoligono = geojson.write (poligono.features, true);
<br> / / Capture the zoom level of the map
<br> nivelZoom map.getZoom = ();
<br> / / Call the function as parameter is the level of zoom and the coordinates
<br> query (strPoligono, nivelZoom);
<br>
<br> )
<br>
<br> I use the following layer:
<br>
<br> / / Layer to design for polygon generation of space research
<br> polygon = new OpenLayers.Layer.Vector ( 'Search Polygon',
<br> / / Blue Style applied to the polygon
<br> (
<br> Style: OpenLayers.StyleMap new ((
<br> fillColor: "# 333399"
<br> fillOpacity: 0.5
<br> ))
<br> )
<br> );
<br>
<br>
<br> Can anyone help me?
<br>
<br> Thank you for your attention. Have a great week.
<br> --
<br> ________________________________________________
<br> Diego Roberto<br> + 55 (62) 9619-0902
<br> "Run after your dream ... They are the only thing you care even when you're sleeping!"
<br>
<br> ________________________________________________</div></div></div><br>
<hr size=1>Veja quais são os assuntos do momento no Yahoo! + Buscados: <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/">Top 10</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/celebridades/">Celebridades</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/m%C3%BAsica/">Música</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/esportes/">Esportes</a></body></html>