Good afternoon, I'm struggling with implementing the capture coordinate with
the
right mouse button.
I found one instance of OL http://openlayers.org/dev/examples/click.html for
the
click event tried to accomplish through the rightclick instead of clicking
unsuccessfully.
I performed the tests also with:
map.div.oncontextmenu = function noContextMenu(e) {
if (OpenLayers.Event.isLeftClick(e)){
var lonlat = map.getLonLatFromViewPortPx(e.xy);
alert("You clicked near " + lonlat.lat + " N, " +
+ lonlat.lon + " E");
}
return false; //cancel the right click of brower
};
But the words lonlat var = map.getLonLatFromViewPortPx (e.xy); not catch the
coordinates.
The event itself would need to integrate this work to capture the coordinates.
Could anyone give me some solution.
Grateful
Diego
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users