kopia lustrzana https://github.com/projecthorus/chasemapper
Polyline control switches between metric and imperial
rodzic
7561641615
commit
7f50501974
|
@ -249,12 +249,30 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add measurement control.
|
// Add measurement control.
|
||||||
|
|
||||||
|
if (chase_config['unitselection'] == "imperial") {
|
||||||
|
|
||||||
|
|
||||||
|
L.control.polylineMeasure({
|
||||||
|
position: 'topleft',
|
||||||
|
unit: 'landmiles',
|
||||||
|
showClearControl: true,
|
||||||
|
}).addTo(map);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (chase_config['unitselection'] == "metric") {
|
||||||
L.control.polylineMeasure({
|
L.control.polylineMeasure({
|
||||||
position: 'topleft',
|
position: 'topleft',
|
||||||
unit: 'metres',
|
unit: 'metres',
|
||||||
showClearControl: true,
|
showClearControl: true,
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Add layer selection control (top right).
|
// Add layer selection control (top right).
|
||||||
map.addControl(new L.Control.Layers(map_layers));
|
map.addControl(new L.Control.Layers(map_layers));
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue