scale bar - reduce the width on mobile
This commit is contained in:
parent
94fbf5ba08
commit
9ff9671def
@ -29,7 +29,7 @@ window.plugin.scaleBar.setup = function() {
|
|||||||
// system already.
|
// system already.
|
||||||
if (window.isSmartphone()) {
|
if (window.isSmartphone()) {
|
||||||
$('head').append('<style>.leaflet-control-scale { position: absolute; bottom: 15px; left: 0px; margin-bottom: 20px !important; } </style>');
|
$('head').append('<style>.leaflet-control-scale { position: absolute; bottom: 15px; left: 0px; margin-bottom: 20px !important; } </style>');
|
||||||
window.map.addControl(new L.Control.Scale({position: 'bottomleft', imperial: false, maxWidth: 200}));
|
window.map.addControl(new L.Control.Scale({position: 'bottomleft', imperial: false, maxWidth: 100}));
|
||||||
} else {
|
} else {
|
||||||
$('head').append('<style>.leaflet-control-scale { position: absolute; top: 2px; left: 40px; } </style>');
|
$('head').append('<style>.leaflet-control-scale { position: absolute; top: 2px; left: 40px; } </style>');
|
||||||
window.map.addControl(new L.Control.Scale({position: 'topleft', imperial: false, maxWidth: 200}));
|
window.map.addControl(new L.Control.Scale({position: 'topleft', imperial: false, maxWidth: 200}));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user