This commit is contained in:
yanran200730
2022-07-07 10:31:54 +08:00
parent aeb5e58efa
commit b0bca45d11

View File

@@ -32,8 +32,7 @@
polygons: [],
labels: [],
businessName: '',
ops: {
},
ops: {},
markers: [],
isShow: false,
MarkerCluster: null,
@@ -61,9 +60,9 @@
this.isShow = false
this.map.easeTo({
center: new this.lib.LatLng(item.lat, item.lng),
zoom: 17
zoom: 20
}, {
duration: 2000
duration: 800
})
},
@@ -155,8 +154,6 @@
}
}
// this.config.latlng && map.setCenter(this.config.latlng)
this.MarkerCluster = new TMap.MarkerCluster({
map, gridSize: 60,
enableDefaultStyle: false, // 关闭默认样式
@@ -166,7 +163,8 @@
content: `${e.name}`,
properties: {...e}
})) || [],
zoomOnClick: true
zoomOnClick: true,
maxZoom: 18
})
this.setCenter(points.map(e => {
return new TMap.LatLng(e.lat, e.lng)