Merge branch 'ent-4999-9146-Ventanas-info-agentes-en-gis-no-funcionan-bien' into 'develop'

fix bug when selecting and unselecting feature in gis maps

See merge request artica/pandorafms!2905
This commit is contained in:
vgilc 2019-12-10 11:32:56 +01:00
commit f1e648404c
1 changed files with 10 additions and 1 deletions

View File

@ -275,7 +275,16 @@ function gis_activate_select_control($layers=null)
$(document).ready (
function () {
var layers = map.getLayersByClass("OpenLayers.Layer.Vector");
var select = new OpenLayers.Control.SelectFeature(layers);
var select = new OpenLayers.Control.SelectFeature(layers, {
clickout: true,
multiple: true,
toggle: true,
autoActivate: true,
onSelect: function() {
OpenLayers.Control.SelectFeature.prototype.unselectAll.apply(
select);
}
});
map.addControl(select);
select.activate();
}