I need to know the exact point the function was clicked on. Using SelectFeature I can get information about which function was pressed, but there is no location information on the map.
Here is the code that the listner function creates:
select = new OpenLayers.Control.SelectFeature(
[vectorLayer],
{
clickout: false, toggle: false,
multiple: false, hover: false
}
);
osMap.addControl(select);
and here is my definition of a listener:
vectorLayer.events.on({
"featureselected": function(e) {
var lonlat = osMap.getLonLatFromViewPortPx(e.xy);
}
});
thank
source
share