diff --git a/combo/apps/maps/static/js/combo.map.js b/combo/apps/maps/static/js/combo.map.js index 16218910..2380cecc 100644 --- a/combo/apps/maps/static/js/combo.map.js +++ b/combo/apps/maps/static/js/combo.map.js @@ -147,6 +147,36 @@ $(function() { } }, + disable_layer: function(slug) { + var layer = this.geojson_layers[slug]; + var group = this.clustered_markers || this; + if (layer) { + group.removeLayer(layer.leaflet_layer); + } + }, + + enable_layer: function(slug) { + var layer = this.geojson_layers[slug]; + var group = this.clustered_markers || this; + if (layer) { + group.addLayer(layer.leaflet_layer); + } + }, + + disable_all_layers: function() { + var layer_slugs = Object.keys(this.geojson_layers); + for (var i=0; i