|
|
@ -1,7 +1,7 @@ |
|
|
<script setup> |
|
|
<script setup> |
|
|
import { onMounted, onUnmounted } from 'vue' |
|
|
import { onMounted, onUnmounted } from 'vue' |
|
|
import mapboxgl from 'mapbox-gl' |
|
|
import mapboxgl from 'mapbox-gl' |
|
|
import mapConfig, { MAP_STYLES } from '@/config/map' |
|
|
|
|
|
|
|
|
import mapConfig, { MAP_STYLES, MAP_OVERVIEW, MAP_VIEW } from '@/config/map' |
|
|
import commonRefs from '@/utils/commonRefs' |
|
|
import commonRefs from '@/utils/commonRefs' |
|
|
import mapHelper from '@/core/mapHelper' |
|
|
import mapHelper from '@/core/mapHelper' |
|
|
import 'mapbox-gl/dist/mapbox-gl.css' |
|
|
import 'mapbox-gl/dist/mapbox-gl.css' |
|
|
@ -21,10 +21,11 @@ function initMap() { |
|
|
map = new mapboxgl.Map({ |
|
|
map = new mapboxgl.Map({ |
|
|
container: 'map', |
|
|
container: 'map', |
|
|
style: MAP_STYLES.satellite, |
|
|
style: MAP_STYLES.satellite, |
|
|
center: mapConfig.center, |
|
|
|
|
|
zoom: mapConfig.zoom, |
|
|
|
|
|
minZoom: 3, |
|
|
|
|
|
|
|
|
center: MAP_OVERVIEW.center, |
|
|
|
|
|
zoom: MAP_OVERVIEW.zoom, |
|
|
|
|
|
minZoom: MAP_VIEW.minZoom, |
|
|
attributionControl: false, |
|
|
attributionControl: false, |
|
|
|
|
|
projection: 'globe', |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
commonRefs.setRef('map', map) |
|
|
commonRefs.setRef('map', map) |
|
|
|