Great, thanks everyone! I got what I needed and it works great!<br><br><div class="gmail_quote">On Mon, Dec 21, 2009 at 3:43 PM, Rodolfo Barriga <span dir="ltr"><<a href="mailto:rodolfo.barriga@gmail.com">rodolfo.barriga@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">you can create a custom openlayer control ... something like this <br><br><br><br>OpenLayers.Control.<div>
ClickLayerInfo = OpenLayers.Class(OpenLayers.Control, {<br> defaultHandlerOptions: {<br> 'single': true,<br>
'double': false,<br> 'pixelTolerance': 0, //tolarance<br> 'stopSingle': false,<br> 'stopDouble': false<br> },<br> initialize: function(options) {<br> this.handlerOptions = OpenLayers.Util.extend(<br>
{}, this.defaultHandlerOptions<br> );<br> OpenLayers.Control.prototype.initialize.apply(<br> this, arguments<br> );<br> this.handler = new OpenLayers.Handler.Click(<br> this, {<br>
'click': this.trigger<br> }, this.handlerOptions<br> );<br> },<br> trigger: function(e) {<br> var lonLat = you_map.getLonLatFromViewPortPx(e.xy);<br> <br> // you cant transform you lat and lon <br>
// you can def a pixel buffer with the map resolution <br> // you can do a asyn call<br> }<br>});<br><br>its work for me !! :-)<br>gretting Rodolfo B.</div><br><br></div></div><div class="gmail_quote"><div>
<div></div><div class="h5">2009/12/21 Robert Hicks <span dir="ltr"><<a href="mailto:robhyx@gmail.com" target="_blank">robhyx@gmail.com</a>></span><br>
</div></div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">Hey all, is there a way to get the coordinates of a point on the map that a user has just clicked on? I see Mouse-position displays the coordinates at the bottom of the screen, and I also see you can register muliple mouse events to te map, but I need to store coordinates in a javascript var to send in a request to my server.<div>
<div></div><div class="h5"><div>
<br></div><div>Thanks!<br clear="all"><br>-- <br>web <a href="http://www.hyxspace.com" target="_blank">http://www.hyxspace.com</a><br>aim hyx1138<br>
</div>
<br></div></div><div class="im">_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@openlayers.org" target="_blank">Dev@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/dev" target="_blank">http://openlayers.org/mailman/listinfo/dev</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br><br clear="all"><br>-- <br>web <a href="http://www.hyxspace.com">http://www.hyxspace.com</a><br>aim hyx1138<br>