|
@@ -49,7 +49,7 @@
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
baseMapLayers: { default: () => [] },
|
|
baseMapLayers: { default: () => [] },
|
|
- baseMapView: {},
|
|
+ baseMapView: <any>{},
|
|
},
|
|
},
|
|
setup(props, { emit }) {
|
|
setup(props, { emit }) {
|
|
const store = useStore();
|
|
const store = useStore();
|
|
@@ -63,7 +63,7 @@
|
|
formatLatitude: <any>null,
|
|
formatLatitude: <any>null,
|
|
},
|
|
},
|
|
interactionZoom: props.baseMapView.zoom,
|
|
interactionZoom: props.baseMapView.zoom,
|
|
- realBaseLayers: null,
|
|
+ realBaseLayers: <any>null,
|
|
});
|
|
});
|
|
const easyMapOl = ref()
|
|
const easyMapOl = ref()
|
|
const ref_easyMapOl = ref()
|
|
const ref_easyMapOl = ref()
|
|
@@ -72,6 +72,10 @@
|
|
const ref_easyMap_scaleLine = ref()
|
|
const ref_easyMap_scaleLine = ref()
|
|
const initMap = () => {
|
|
const initMap = () => {
|
|
state.realBaseLayers = props.baseMapLayers.map(v => InitMapInfoClass.isInternet ? InitMapInfoClass.initInternet(v) : InitMapInfoClass.initBaseLayer(v))
|
|
state.realBaseLayers = props.baseMapLayers.map(v => InitMapInfoClass.isInternet ? InitMapInfoClass.initInternet(v) : InitMapInfoClass.initBaseLayer(v))
|
|
|
|
+ const view = new ol.View(props.baseMapView)
|
|
|
|
+ for (const baseMapViewKey in props.baseMapView) {
|
|
|
|
+ view.set(baseMapViewKey, props.baseMapView[baseMapViewKey])
|
|
|
|
+ }
|
|
easyMapOl.value = new ol.Map({
|
|
easyMapOl.value = new ol.Map({
|
|
target: ref_easyMapOl.value,
|
|
target: ref_easyMapOl.value,
|
|
layers: [
|
|
layers: [
|
|
@@ -81,7 +85,7 @@
|
|
zIndex: 1
|
|
zIndex: 1
|
|
}),
|
|
}),
|
|
],
|
|
],
|
|
- view: new ol.View(props.baseMapView),
|
|
+ view: view,
|
|
controls: control.defaults({
|
|
controls: control.defaults({
|
|
attribution: false,
|
|
attribution: false,
|
|
rotate: false,
|
|
rotate: false,
|