Tag Info

New answers tagged

2

To combine hover and click in OpenLayers 2.x, it is sufficient to override the clickFeature method of OpenLayers.Control.SelectFeature. The default implementation does nothing on hover but is still called on click: clickFeature: function (feature) { if (!this.hover) { ... } } This code demonstrates that it is possible to handle the feature click ...


0

You need to add L.DomEvent.disableClickPropagation(this._baseLayerDropDown); That seems to allow it to work once that is added. This fixes it for version 0.7.3 of leaflet. If that line doesn't work, try doing it to the first div or something.



Top 50 recent answers are included