Scenario 1:
Let's say I have something like this:
`app_obj.MapObj.map.events.register("click", app_obj.MapObj.map, self.pointToVideoSearch);`
and another Click Control
OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
"single" : true,
"double" : false,
"pixelTolerance" : 0,
"stopSingle" : true,
"stopDouble" : false
},
initialize: function(options){
this.handlerOptions = OpenLayers.Util.extend(
{}, this.defaultHandlerOptions
);
OpenLayers.Control.prototype.initialize.apply(this, arguments);
this.handler = new OpenLayers.Handler.Click(
this, {
"click" : this.onClick,
"dblclick": this.onDblclick
}, this.handlerOptions
);
},
onClick: clickFunction,
onDblclick: dblClickFunction
});
When I click on the map, first and second control (it's activated) are fired up. Why the "clickStop" is not working and stoping other click events to be fired?
Scenario 2:
if I had event like in Scenario 1:
app_obj.MapObj.map.events.register("click", app_obj.MapObj.map, self.pointToVideoSearch);
and a DrawFeature control to draw let's say Polygon, then the first event is silenced (when I am drawing polygon), never fires up until you are not finished with drawing polygon
My question is, what is stoping first event to fire up? I need to find out that tehnic
Thanks
Best Answer
Try with this:
And add the corresponding event functions.