diff --git a/plugins/minimap.user.js b/plugins/minimap.user.js
index d8c49cda..23a1ea8a 100644
--- a/plugins/minimap.user.js
+++ b/plugins/minimap.user.js
@@ -41,17 +41,17 @@ window.plugin.miniMap.setup = function() {
var mqMapOpt = {attribution: osmAttribution+', Tiles Courtesy of MapQuest', maxZoom: 18, subdomains: mqSubdomains};
var mqMap = new L.TileLayer(mqTileUrlPrefix+'/tiles/1.0.0/map/{z}/{x}/{y}.jpg',mqMapOpt);
- if(!isSmartphone()) {
- // desktop mode - bottom-left, so it doesn't clash with the sidebar
- new L.Control.MiniMap(mqMap, {toggleDisplay: true, position: 'bottomleft'}).addTo(window.map);
- } else {
- // mobile mode - bottom-right - so it floats above the map copyright text
- new L.Control.MiniMap(mqMap, {toggleDisplay: true, position: 'bottomright'}).addTo(window.map);
- }
+ setTimeout(function() {
+ if(!isSmartphone()) {
+ // desktop mode - bottom-left, so it doesn't clash with the sidebar
+ new L.Control.MiniMap(mqMap, {toggleDisplay: true, position: 'bottomleft'}).addTo(window.map);
+ } else {
+ // mobile mode - bottom-right - so it floats above the map copyright text
+ new L.Control.MiniMap(mqMap, {toggleDisplay: true, position: 'bottomright'}).addTo(window.map);
+ }
+ }, 0);
$('head').append('');
-
-
};
var setup = window.plugin.miniMap.setup;
diff --git a/plugins/zoom-slider.user.js b/plugins/zoom-slider.user.js
index d54e4be0..0b5a96a9 100644
--- a/plugins/zoom-slider.user.js
+++ b/plugins/zoom-slider.user.js
@@ -27,6 +27,11 @@ window.plugin.zoomSlider.setup = function() {
@@INCLUDERAW:external/L.Control.Zoomslider.js@@
try { console.log('done loading Leaflet.zoomslider JS'); } catch(e) {}
+ // prevent Zoomslider from being activated by default (e.g. in minimap)
+ L.Map.mergeOptions({
+ zoomsliderControl: false
+ });
+
if(map.zoomControl._map) {
window.map.removeControl(map.zoomControl);
}
@@ -35,7 +40,7 @@ window.plugin.zoomSlider.setup = function() {
$('head').append('');
};
-var setup = window.plugin.zoomSlider.setup;
+var setup = window.plugin.zoomSlider.setup;
// PLUGIN END //////////////////////////////////////////////////////////