I have a map with some Overlays (DIVs with a text content) on it. I have "click" event registered for the map like:
map.on('click', function(evt) {
var click_coordinates = evt.coordinate;
});
It works fine until a user click an Overlay. In that case the event is probably catch by the Overlay, but it's not propagated to the map. It's OK for some situations, but sometimes I need the event to be handled by the map. So I catch the click event on the Overlay and I try do send it to the map element by
map.dispatchEvent("click");
The good thing is, the event on the map is fired, unfortunately it's "different" object, than originaly as it contains no "coordinate" attribute and other Openlayers stuff. Is there a way, how to dispatch the event in the same way as natural click on the map?