summaryrefslogtreecommitdiff
path: root/web/js
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2016-06-19 13:17:28 +0200
committerChristian Franke <nobody@nowhere.ws>2016-06-19 13:18:06 +0200
commit83a64d1e3085402fd73604ec7f468e5d28ddd59b (patch)
tree960e15f112ad0d360af648847fe22c09622f11c5 /web/js
parent69ec660a501dbccc7bb630482149062dc4ff387c (diff)
Allow to specify layer opacity
Diffstat (limited to 'web/js')
-rw-r--r--web/js/eventmap.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/js/eventmap.js b/web/js/eventmap.js
index e974cb3..2d9a4e0 100644
--- a/web/js/eventmap.js
+++ b/web/js/eventmap.js
@@ -558,11 +558,14 @@ $(function() {
layer_path = 'images/tiles/' + layer_info.name
+ '/{z}/{x}/{y}.png';
-
+ var layer_opacity = layer_info.opacity;
+ if (layer_opacity === undefined)
+ layer_opacity = 1.0;
base_layer = L.tileLayer(layer_path, {
noWrap: true,
continuousWorld: true,
- maxZoom: layer_info.max_zoom
+ maxZoom: layer_info.max_zoom,
+ opacity: layer_opacity
});
drawing_layer = new L.FeatureGroup();