Add scale
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import 'maplibre-gl/dist/maplibre-gl.css';
|
||||
import { Map, Marker, LngLatBounds, LngLat, Popup } from 'maplibre-gl';
|
||||
import { Map, Marker, LngLatBounds, LngLat, Popup, ScaleControl } from 'maplibre-gl';
|
||||
import { createApp } from 'vue';
|
||||
import Simplebar from 'simplebar-vue';
|
||||
|
||||
@@ -199,6 +199,7 @@ export default {
|
||||
},
|
||||
attributionControl: false
|
||||
});
|
||||
if(!this.isMobile()) this.map.addControl(new ScaleControl({unit: 'metric'}), 'bottom-right');
|
||||
|
||||
//Get default basemap
|
||||
this.baseMap = this.baseMaps.find((asBM) => asBM.default_map)?.codename ?? null;
|
||||
|
||||
Reference in New Issue
Block a user