[OpenLayers-Users] Why Click Handler is Not working after navigation control is activated?

Jørgen S. Nicolaysen smockmakker at gmail.com
Sat May 10 00:29:40 PDT 2014


Hi
I have had similar experiences like this. You could check that you might
have double activated controls. On of the controls might do a
e.preventDefault(), e.stopPropagation() or "return false" which might stop
other controls from receiving the event. (Perhaps you need an "return true"
in your handler?). 

Try to loop over active controls to check, controls are in the array
"map.controls":
for (var i=0,len=map.controls.lenght;i<len;i++) {
  if (map.controls[i].active) {
    console.log(map.controls[i].CLASS_NAME);
  }
}

Note that some should still be active, like zoomControls or panControls. 




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Why-Click-Handler-is-Not-working-after-navigation-control-is-activated-tp5139136p5139516.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list