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:
commit
f1e648404c
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue