@@ -1,5 +1,6 @@
|
||||
<script>
|
||||
import { Map, Marker, LngLatBounds, LngLat, Popup, ScaleControl, NavigationControl, setWorkerUrl } from 'maplibre-gl';
|
||||
import maplibreWorkerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url';
|
||||
import 'maplibre-gl/dist/maplibre-gl.css';
|
||||
|
||||
import { createApp } from 'vue';
|
||||
@@ -12,7 +13,7 @@ import ProjectPopup from '@components/projectPopup';
|
||||
import ProjectFeed from '@components/projectFeed';
|
||||
import ProjectSettings from '@components/projectSettings';
|
||||
|
||||
setWorkerUrl('maplibre/maplibre-gl-worker.mjs');
|
||||
setWorkerUrl(maplibreWorkerUrl);
|
||||
|
||||
class GroupedScaleControl {
|
||||
constructor(options) {
|
||||
@@ -486,7 +487,7 @@ export default {
|
||||
|
||||
this.map.jumpTo({
|
||||
center: new LngLat(oDefaultProject.longitude, oDefaultProject.latitude),
|
||||
zoom: Math.log2(iWorldSize / this.map.transform.tileSize),
|
||||
zoom: Math.log2(iWorldSize / 512),
|
||||
pitch: 0,
|
||||
bearing: 0
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user