| | |
| | | }; |
| | | }, |
| | | mounted() { |
| | | console.log('/* 创建地图实例 */') |
| | | setTimeout(() => { |
| | | this.createrMap(); |
| | | }, 100); |
| | |
| | | methods: { |
| | | /* 创建地图实例 */ |
| | | createrMap() { |
| | | |
| | | this.option.center = [eval(this.map_point.y), eval(this.map_point.x)]; |
| | | this.option.zoom = this.map_zoom; |
| | | this.map = this.$map.createrMap("map-container", this.option); |
| | | // this.$map.createrLayers(this.map, this.mapUrls) //切片地图 |
| | | // this.$map.createrChinatm(this.map, this.mapUrl); // 图层 |
| | | |
| | | this.map.pm.setLang("zh"); |
| | | // this.map.pm.addControls(this.options); |
| | | // this.map.on("pm:drawstart", (e) => { |
| | | // // // workingLayer.on('pm:create', e => { |
| | | // // console.log("绘制开始"); |
| | | // // console.log(e); |
| | | // // // }); |
| | | // }); |
| | | // this.map.on("pm:drawend", (e) => { |
| | | // // // workingLayer.on('pm:create', e => { |
| | | // // console.log("绘制结束"); |
| | | // // // }); |
| | | // }); |
| | | this.locationMap(); |
| | | |
| | | }, |
| | | locationMap() { |
| | | if (this.mark && this.map) { |