Merge branch 'build' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_webapp into build
This commit is contained in:
@@ -65,6 +65,7 @@ export default {
|
||||
document.body.appendChild(script);
|
||||
},
|
||||
initTMap() {
|
||||
const TMap = window?.TMap
|
||||
this.mapLib = TMap
|
||||
this.tmap = new TMap.Map(this.$refs.tmap, {
|
||||
zoom: 11,
|
||||
@@ -76,7 +77,7 @@ export default {
|
||||
this.areaId && this.getMapArea()
|
||||
},
|
||||
getMapArea() {
|
||||
let {mapLib, areaId, tmap: map} = this, keyword = areaId.substring(0, 6)
|
||||
let {mapLib: TMap, areaId, tmap: map} = this, keyword = areaId.substring(0, 6)
|
||||
const fitBounds = (latLngList) => {
|
||||
// 由多边形顶点坐标数组计算能完整呈现该多边形的最小矩形范围
|
||||
if (latLngList.length === 0) {
|
||||
@@ -98,7 +99,7 @@ export default {
|
||||
);
|
||||
}
|
||||
let polygons = new TMap.MultiPolygon({map, geometries: []});
|
||||
new mapLib.service.District({
|
||||
new TMap.service.District({
|
||||
polygon: 2,
|
||||
maxOffset: 100
|
||||
}).search({keyword}).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user