| | |
| | | <div ref="imageWrapper"> |
| | | <div class="btn-grounp"> |
| | | <button v-if="addShow" class="draw" @click="draw()">开始绘制</button> |
| | | <button v-if="!addShow" class="repeal" @click="repeal()">撤销</button> |
| | | <button v-if="!addShow&&repealShow" class="repeal" @click="repeal()">撤销</button> |
| | | <button v-if="regionFull" class="save" @click="save()">保存</button> |
| | | </div> |
| | | <!-- <button class="disDraw" @click="disDraw()">关闭绘制</button> --> |
| | |
| | | lng: "", |
| | | lat: "", |
| | | addShow: false, |
| | | repealShow:false, |
| | | |
| | | currentPolygons: [], |
| | | |
| | |
| | | this.complete.remove() |
| | | |
| | | this.addShow = true |
| | | |
| | | this.repealShow = false |
| | | this.regionFull = false |
| | | |
| | | // Object.values(this.map._layers).forEach(item => { |
| | |
| | | var parmasObj = this.getUrlParams(str) |
| | | |
| | | if(parmasObj.status){//后台镜头移动 |
| | | this.repealShow = false |
| | | this.regionFull = false |
| | | if(this.rectangleLayer.getBounds() != this.tempBounds){ |
| | | if(this.map.getZoom()>16){ |
| | | this.rectangleLayer.getBounds()._northEast.lng = this.rectangleLayer.getBounds()._northEast.lng+0.007 |
| | |
| | | console.error('oops, something went wrong!', error) |
| | | }) |
| | | } |
| | | }, 1500); |
| | | }, 1000); |
| | | }, |
| | | |
| | | getUrlParams(urlParams) { |
| | |
| | | this.map.on('pm:drawstart', ({ workingLayer }) => { |
| | | |
| | | this.addShow = false |
| | | |
| | | this.repealShow = false |
| | | that.rectangleLayer = workingLayer |
| | | |
| | | console.log(workingLayer, 5465456) |
| | |
| | | }) |
| | | |
| | | this.map.on("pm:create", e => { |
| | | |
| | | that.repealShow = true |
| | | that.regionFull = true |
| | | |
| | | // 绘制坐标 |