]> git.openstreetmap.org Git - rails.git/commitdiff
Propagate API keys to minimaps in layer switcher
authorTom Hughes <tom@compton.nu>
Thu, 8 Sep 2016 16:35:37 +0000 (17:35 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 8 Sep 2016 16:35:37 +0000 (17:35 +0100)
app/assets/javascripts/leaflet.layers.js

index 9f2e50a6f4afaa928cb6c1611b24843708cabd09..c294f13ef2ef749065a4753e3a0e5f13a369a03b 100644 (file)
@@ -50,7 +50,7 @@ L.OSM.layers = function(options) {
 
       map.whenReady(function() {
         var miniMap = L.map(div[0], {attributionControl: false, zoomControl: false})
-          .addLayer(new layer.constructor());
+          .addLayer(new layer.constructor({ apikey: layer.options.apikey }));
 
         miniMap.dragging.disable();
         miniMap.touchZoom.disable();