|
@@ -131,8 +131,7 @@ export default {
|
|
|
showDrawer: false, // 右侧模块显隐
|
|
|
pattern: 0, // 模式选择
|
|
|
|
|
|
- map: null,
|
|
|
- markerList: [],
|
|
|
+ // map: null,
|
|
|
Icons: {
|
|
|
yljg: null,
|
|
|
sqyljg: null
|
|
@@ -171,12 +170,12 @@ export default {
|
|
|
this.Icons.yljg = new AMap.Icon({
|
|
|
size: new AMap.Size(50, 50),
|
|
|
imageSize: new AMap.Size(50, 50),
|
|
|
- image: require('@/assets/images/bigScreen/wlfw.png')
|
|
|
+ image: require('@/assets/images/bigScreen/yljg.png')
|
|
|
})
|
|
|
this.Icons.sqyljg = new AMap.Icon({
|
|
|
size: new AMap.Size(50, 50),
|
|
|
imageSize: new AMap.Size(50, 50),
|
|
|
- image: require('@/assets/images/bigScreen/yljg.png')
|
|
|
+ image: require('@/assets/images/bigScreen/sqyljg.png')
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -190,6 +189,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
setMarker(data) {
|
|
|
+ console.log(data)
|
|
|
let markerList = []
|
|
|
this.setIcon()
|
|
|
data.forEach((item) => {
|
|
@@ -235,18 +235,25 @@ export default {
|
|
|
version: '2.0'
|
|
|
}
|
|
|
}).then((AMap) => {
|
|
|
- this.map = new AMap.Map('container', {
|
|
|
+ let map = new AMap.Map('container', {
|
|
|
resizeEnable: true, //是否监控地图容器尺寸变化
|
|
|
mapStyle: 'amap://styles/blue',
|
|
|
showIndoorMap: true,
|
|
|
pitch: 60,
|
|
|
viewMode: '3D',
|
|
|
terrain: true,
|
|
|
+ center:[125.320113,43.833376],
|
|
|
zoom: 16,
|
|
|
zooms: [2, 22]
|
|
|
})
|
|
|
- this.map.add(this.setMarker(markers))
|
|
|
- this.map.setFitView()
|
|
|
+ map.add(this.setMarker(markers))
|
|
|
+ map.setFitView()
|
|
|
+ map.on('zoomend', () => {
|
|
|
+ console.log(map.getZoom())
|
|
|
+ })
|
|
|
+ map.on('moveend', () => {
|
|
|
+ console.log(map.getCenter())
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
|