|
@@ -2,8 +2,8 @@
|
|
|
<div id="globalMap">
|
|
|
<div class="global-map">
|
|
|
<MapLogical v-if="activeMap === 'logical'" :map-data="mapData" />
|
|
|
- <!-- <YMap v-else-if="['satellite2', 'satellite3'].includes(activeMap)" :activeMap="activeMap" />-->
|
|
|
- <YztMap v-else-if="['satellite2', 'satellite3'].includes(activeMap)" ref="map2Ref" :active-map="activeMap" :point-type="pointType" />
|
|
|
+ <!-- <YMap v-else-if="['imageMap', 'satellite2', 'satellite3'].includes(activeMap)" :activeMap="activeMap" />-->
|
|
|
+ <YztMap v-else-if="['imageMap', 'satellite2', 'satellite3'].includes(activeMap)" ref="map2Ref" :active-map="activeMap" :point-type="pointType" />
|
|
|
<Map v-else ref="mapRef" :active-map="activeMap" :point-type="pointType" @handle-show-video="handleShowVideo" @handleShowWarehouse="handleShowWarehouse" />
|
|
|
<!--左侧菜单-->
|
|
|
<LeftMenu style="position: absolute; top: 20px; left: 20px" @click-menu="clickMenu" @select-search-marker="selectSearchMarker" />
|
|
@@ -48,7 +48,7 @@ const switchMap = (key) => {
|
|
|
let pointType = ref<PointType[]>([]);
|
|
|
let markerList = ref([]);
|
|
|
const addMarkers = (item) => {
|
|
|
- const dom = activeMap.value === 'satellite2' ? map2Ref.value : mapRef.value;
|
|
|
+ const dom = activeMap.value === 'imageMap' ? map2Ref.value : mapRef.value;
|
|
|
if (dom) {
|
|
|
if (!item.checked) {
|
|
|
let index = pointType.value.findIndex((item2) => item.component === item2.component);
|
|
@@ -96,7 +96,7 @@ const addMarkers = (item) => {
|
|
|
};
|
|
|
// 跳转指定地点
|
|
|
const toAddress = (item) => {
|
|
|
- const dom = activeMap.value === 'satellite2' ? map2Ref.value : mapRef.value;
|
|
|
+ const dom = activeMap.value === 'imageMap' ? map2Ref.value : mapRef.value;
|
|
|
dom.setCenter(item);
|
|
|
};
|
|
|
|
|
@@ -139,7 +139,7 @@ const findChecked = (dataList, name) => {
|
|
|
};
|
|
|
// 点击搜索结果,添加标注
|
|
|
const selectSearchMarker = (item) => {
|
|
|
- const dom = activeMap.value === 'satellite2' ? map2Ref.value : mapRef.value;
|
|
|
+ const dom = activeMap.value === 'imageMap' ? map2Ref.value : mapRef.value;
|
|
|
let item2 = deepClone(item);
|
|
|
// 获取图标
|
|
|
if (iconList[item2.dataType]) {
|
|
@@ -161,7 +161,7 @@ const handleAnalysisData = (data) => {
|
|
|
};
|
|
|
// 获取地图元素操作
|
|
|
const getMap = () => {
|
|
|
- if (['satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
+ if (['imageMap', 'satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
return map2Ref.value.getMap();
|
|
|
} else if (['vectorgraph', 'satellite'].includes(activeMap.value)) {
|
|
|
return mapRef.value.getMap();
|
|
@@ -169,7 +169,7 @@ const getMap = () => {
|
|
|
return {};
|
|
|
};
|
|
|
const showDetail = (data, dataType) => {
|
|
|
- if (['satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
+ if (['imageMap', 'satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
return map2Ref.value.handleHover(data, dataType);
|
|
|
} else if (['vectorgraph', 'satellite'].includes(activeMap.value)) {
|
|
|
return mapRef.value.handleHover(data, dataType);
|
|
@@ -177,7 +177,7 @@ const showDetail = (data, dataType) => {
|
|
|
return {};
|
|
|
};
|
|
|
const getDrawTool = () => {
|
|
|
- if (['satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
+ if (['imageMap', 'satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
return map2Ref.value.drawTool;
|
|
|
} else if (['vectorgraph', 'satellite'].includes(activeMap.value)) {
|
|
|
return mapRef.value.drawTool;
|
|
@@ -185,7 +185,7 @@ const getDrawTool = () => {
|
|
|
return {};
|
|
|
};
|
|
|
const getMarkers = () => {
|
|
|
- if (['satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
+ if (['imageMap', 'satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
return map2Ref.value.getMarkers();
|
|
|
} else if (['vectorgraph', 'satellite'].includes(activeMap.value)) {
|
|
|
return mapRef.value.getMarkers();
|
|
@@ -193,7 +193,7 @@ const getMarkers = () => {
|
|
|
return {};
|
|
|
};
|
|
|
const trackPlayback = (data) => {
|
|
|
- if (['satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
+ if (['imageMap','satellite2', 'satellite3'].includes(activeMap.value)) {
|
|
|
return map2Ref.value.trackPlayback(data);
|
|
|
} else if (['vectorgraph', 'satellite'].includes(activeMap.value)) {
|
|
|
return mapRef.value.trackPlayback(data);
|