diff --git a/components/AiDvRender.vue b/components/AiDvRender.vue
index 1cbbe6ae..9b3ca750 100644
--- a/components/AiDvRender.vue
+++ b/components/AiDvRender.vue
@@ -7,7 +7,8 @@
:title="data.title"
:theme="theme"
:border="data.border || ''">
-
-
-
+
+
+
+
-
+
@@ -93,7 +103,8 @@ export default {
map: null,
lib: null,
timer: null,
- dvTableConfig: []
+ dvTableConfig: [],
+ mapDialog: false
}
},
computed: {
@@ -168,9 +179,13 @@ export default {
let {lib: AMap, map} = this
this.timer && clearInterval(this.timer)
if (AMap && map) {
- const infoWin = new AMap.InfoWindow({isCustom: true, content: ""})
map.clearMap()
- map.on('click', () => infoWin.close())
+ const center = map.getCenter()
+ map.on('click', () => {
+ map.setZoomAndCenter(11, center)
+ map.setPitch(0)
+ this.mapDialog = false
+ })
this.values.filter(e => e.lng).map((e) => {
const {icon = "https://cdn.cunwuyun.cn/dvcp/h5/Location2.png"} = e
return new AMap.Marker({
@@ -181,16 +196,15 @@ export default {
`,
position: [e.lng, e.lat]
}).on('click', () => {
- if (!!e.openWin || e.infoWindowHtml) {
- map.clearInfoWindow()
- infoWin.setContent(e.infoWindowHtml ? `${e.infoWindowHtml}
` :
- [``, `${e.label}`, '
'].join('')
- )
- infoWin.open(map, [e.lng, e.lat])
- }
+ this.mapDialog = true
+ this.$nextTick(() => {
+ this.$refs.mapInfoWin.innerHTML = e.infoWindowHtml || [``, `${e.label}`, '
'].join('')
+ map.setZoomAndCenter(18, [e.lng, e.lat])
+ map.setPitch(60)
+ })
})
})
- this.data.is3d && map.setPitch(65)
+ this.data.is3d > 0 && map.setPitch(65)
if (this.data.is3dAround == 1) {
this.timer = setInterval(() => map?.setRotation(360, false, 16000))
}
@@ -210,7 +224,7 @@ export default {
diff --git a/ui/packages/tools/AiMap.vue b/ui/packages/tools/AiMap.vue
index 6ca450cd..1ef241e3 100644
--- a/ui/packages/tools/AiMap.vue
+++ b/ui/packages/tools/AiMap.vue
@@ -2,6 +2,7 @@
@@ -25,11 +26,6 @@ export default {
onlyShowArea: Boolean,
satellite: Boolean
},
- computed: {
- viewMode() {
- return this.is3d ? '3D' : '2D'
- }
- },
data() {
return {
amap: null,
@@ -46,7 +42,7 @@ export default {
},
methods: {
initMap(c = 0) {
- let {plugins, viewMode, mapStyle} = this
+ let {plugins, mapStyle} = this
AMapLoader.load({
key: '54a02a43d9828a8f9cd4f26fe281e74e',
version: '2.0',
@@ -58,7 +54,7 @@ export default {
if (this.$refs.amap) {
this.amap = new AMap.Map(this.$refs.amap, {
mapStyle,
- viewMode,
+ viewMode: "3D",
terrain: true,
resizeEnable: true,
skyColor: "#082243",