From 83a64d1e3085402fd73604ec7f468e5d28ddd59b Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sun, 19 Jun 2016 13:17:28 +0200 Subject: Allow to specify layer opacity --- web/js/eventmap.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'web') 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(); -- cgit v1.2.1