diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/index.html b/index.html index 4eaa9a8..37f85cd 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ + + +
diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/index.html b/index.html index 4eaa9a8..37f85cd 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ + + +
diff --git a/src/assets/global_images/polygon.png b/src/assets/global_images/polygon.png new file mode 100644 index 0000000..eb2791d --- /dev/null +++ b/src/assets/global_images/polygon.png Binary files differ diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/index.html b/index.html index 4eaa9a8..37f85cd 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ + + +
diff --git a/src/assets/global_images/polygon.png b/src/assets/global_images/polygon.png new file mode 100644 index 0000000..eb2791d --- /dev/null +++ b/src/assets/global_images/polygon.png Binary files differ diff --git a/src/assets/global_images/reset.png b/src/assets/global_images/reset.png new file mode 100644 index 0000000..f8ef703 --- /dev/null +++ b/src/assets/global_images/reset.png Binary files differ diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/index.html b/index.html index 4eaa9a8..37f85cd 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ + + +
diff --git a/src/assets/global_images/polygon.png b/src/assets/global_images/polygon.png new file mode 100644 index 0000000..eb2791d --- /dev/null +++ b/src/assets/global_images/polygon.png Binary files differ diff --git a/src/assets/global_images/reset.png b/src/assets/global_images/reset.png new file mode 100644 index 0000000..f8ef703 --- /dev/null +++ b/src/assets/global_images/reset.png Binary files differ diff --git a/src/assets/global_images/square.png b/src/assets/global_images/square.png new file mode 100644 index 0000000..999f95d --- /dev/null +++ b/src/assets/global_images/square.png Binary files differ diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/index.html b/index.html index 4eaa9a8..37f85cd 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ + + +
diff --git a/src/assets/global_images/polygon.png b/src/assets/global_images/polygon.png new file mode 100644 index 0000000..eb2791d --- /dev/null +++ b/src/assets/global_images/polygon.png Binary files differ diff --git a/src/assets/global_images/reset.png b/src/assets/global_images/reset.png new file mode 100644 index 0000000..f8ef703 --- /dev/null +++ b/src/assets/global_images/reset.png Binary files differ diff --git a/src/assets/global_images/square.png b/src/assets/global_images/square.png new file mode 100644 index 0000000..999f95d --- /dev/null +++ b/src/assets/global_images/square.png Binary files differ diff --git a/src/views/overview/components/clearTool.vue b/src/views/overview/components/clearTool.vue new file mode 100644 index 0000000..3a049d0 --- /dev/null +++ b/src/views/overview/components/clearTool.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/index.html b/index.html index 4eaa9a8..37f85cd 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ + + +
diff --git a/src/assets/global_images/polygon.png b/src/assets/global_images/polygon.png new file mode 100644 index 0000000..eb2791d --- /dev/null +++ b/src/assets/global_images/polygon.png Binary files differ diff --git a/src/assets/global_images/reset.png b/src/assets/global_images/reset.png new file mode 100644 index 0000000..f8ef703 --- /dev/null +++ b/src/assets/global_images/reset.png Binary files differ diff --git a/src/assets/global_images/square.png b/src/assets/global_images/square.png new file mode 100644 index 0000000..999f95d --- /dev/null +++ b/src/assets/global_images/square.png Binary files differ diff --git a/src/views/overview/components/clearTool.vue b/src/views/overview/components/clearTool.vue new file mode 100644 index 0000000..3a049d0 --- /dev/null +++ b/src/views/overview/components/clearTool.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/views/overview/components/drawTool.vue b/src/views/overview/components/drawTool.vue new file mode 100644 index 0000000..da9b175 --- /dev/null +++ b/src/views/overview/components/drawTool.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/index.html b/index.html index 4eaa9a8..37f85cd 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ + + +
diff --git a/src/assets/global_images/polygon.png b/src/assets/global_images/polygon.png new file mode 100644 index 0000000..eb2791d --- /dev/null +++ b/src/assets/global_images/polygon.png Binary files differ diff --git a/src/assets/global_images/reset.png b/src/assets/global_images/reset.png new file mode 100644 index 0000000..f8ef703 --- /dev/null +++ b/src/assets/global_images/reset.png Binary files differ diff --git a/src/assets/global_images/square.png b/src/assets/global_images/square.png new file mode 100644 index 0000000..999f95d --- /dev/null +++ b/src/assets/global_images/square.png Binary files differ diff --git a/src/views/overview/components/clearTool.vue b/src/views/overview/components/clearTool.vue new file mode 100644 index 0000000..3a049d0 --- /dev/null +++ b/src/views/overview/components/clearTool.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/views/overview/components/drawTool.vue b/src/views/overview/components/drawTool.vue new file mode 100644 index 0000000..da9b175 --- /dev/null +++ b/src/views/overview/components/drawTool.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/views/overview/overviewBdOffline.vue b/src/views/overview/overviewBdOffline.vue index 972e9fb..8c3d6f8 100644 --- a/src/views/overview/overviewBdOffline.vue +++ b/src/views/overview/overviewBdOffline.vue @@ -42,6 +42,11 @@ +
+ + + +
- + { + this.drawingManager = new BMapLib.DrawingManager(map, { + isOpen: false, //是否开启绘制模式 + enableDrawingTool: false, //是否显示工具栏 + drawingToolOptions: { + anchor: BMAP_ANCHOR_TOP_RIGHT, //位置 + offset: new BMap.Size(70, 10), //偏离值 + drawingTypes: [ + BMAP_DRAWING_CIRCLE, + BMAP_DRAWING_POLYGON, + BMAP_DRAWING_RECTANGLE + ], + }, + circleOptions: styleOptions, //圆的样式 + polygonOptions: styleOptions, //多边形的样式 + rectangleOptions: styleOptions //矩形的样式 + }) + // 多边形监听器 + this.drawingManager.addEventListener("polygoncomplete", function(polygon) { + console.log('end polygon') + that.drawingManager.close() + that.currentPolygon = polygon + if(that.showMarkers.length>0){ + that.judgeWell(polygon) + }else{ + that.judgeAlarmWell(polygon) + } + }) + // 矩形监听器 + this.drawingManager.addEventListener("rectanglecomplete", function(polygon) { + console.log('end rectangle') + that.drawingManager.close() + that.currentPolygon = polygon + if(that.showMarkers.length>0){ + that.judgeWell(polygon) + }else{ + that.judgeAlarmWell(polygon) + } + }); + }) + //实例化鼠标绘制工具 + }, + // 绘制选框 + drawBox(type) { + + if(this.currentPolygon){ + this.map.removeOverlay(this.currentPolygon) + } + if(type=='Polygon'){ + console.log('start polygon') + this.drawingManager.setDrawingMode(BMAP_DRAWING_POLYGON) + + }else if(type==='Rectangle'){ + console.log('start rectangle') + this.drawingManager.setDrawingMode(BMAP_DRAWING_RECTANGLE) + } + this.drawingManager.open() + this.clearDisabled = false + }, + judgeWell(polygon){ + let count = 0 + const points = polygon.getPath() + const poly = new BMap.Polygon(points) + for(const item of this.showMarkers){ + var ppoint = new BMap.Point(parseFloat(item.position.lng), parseFloat(item.position.lat)) + var result = BMapLib.GeoUtils.isPointInPolygon(ppoint, poly); + if(result) count++ + } + this.$message.info('框选区域内有'+count+'个井') + }, + judgeAlarmWell(polygon){ + let count = 0 + const points = polygon.getPath() + const poly = new BMap.Polygon(points) + for(const item of this.alarmWells){ + var ppoint = new BMap.Point(parseFloat(item.position.lng), parseFloat(item.position.lat)) + var result = BMapLib.GeoUtils.isPointInPolygon(ppoint, poly); + if(result) count++ + } + this.$message.info('框选区域内有'+count+'个井') + }, + drawDelete(){ + // if(this.drawingManager.getDrawingMode()){ + this.drawingManager.close() + if(this.currentPolygon){ + this.map.removeOverlay(this.currentPolygon) + this.clearDisabled = true + } + // } } } } @@ -1153,4 +1266,11 @@ margin-bottom: 15px; } } +.draw-tools{ + position: absolute; + top:20px; + right:90px; + z-index: 100; + display: flex; +} diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/index.html b/index.html index 4eaa9a8..37f85cd 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ + + +
diff --git a/src/assets/global_images/polygon.png b/src/assets/global_images/polygon.png new file mode 100644 index 0000000..eb2791d --- /dev/null +++ b/src/assets/global_images/polygon.png Binary files differ diff --git a/src/assets/global_images/reset.png b/src/assets/global_images/reset.png new file mode 100644 index 0000000..f8ef703 --- /dev/null +++ b/src/assets/global_images/reset.png Binary files differ diff --git a/src/assets/global_images/square.png b/src/assets/global_images/square.png new file mode 100644 index 0000000..999f95d --- /dev/null +++ b/src/assets/global_images/square.png Binary files differ diff --git a/src/views/overview/components/clearTool.vue b/src/views/overview/components/clearTool.vue new file mode 100644 index 0000000..3a049d0 --- /dev/null +++ b/src/views/overview/components/clearTool.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/views/overview/components/drawTool.vue b/src/views/overview/components/drawTool.vue new file mode 100644 index 0000000..da9b175 --- /dev/null +++ b/src/views/overview/components/drawTool.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/views/overview/overviewBdOffline.vue b/src/views/overview/overviewBdOffline.vue index 972e9fb..8c3d6f8 100644 --- a/src/views/overview/overviewBdOffline.vue +++ b/src/views/overview/overviewBdOffline.vue @@ -42,6 +42,11 @@ +
+ + + +
- + { + this.drawingManager = new BMapLib.DrawingManager(map, { + isOpen: false, //是否开启绘制模式 + enableDrawingTool: false, //是否显示工具栏 + drawingToolOptions: { + anchor: BMAP_ANCHOR_TOP_RIGHT, //位置 + offset: new BMap.Size(70, 10), //偏离值 + drawingTypes: [ + BMAP_DRAWING_CIRCLE, + BMAP_DRAWING_POLYGON, + BMAP_DRAWING_RECTANGLE + ], + }, + circleOptions: styleOptions, //圆的样式 + polygonOptions: styleOptions, //多边形的样式 + rectangleOptions: styleOptions //矩形的样式 + }) + // 多边形监听器 + this.drawingManager.addEventListener("polygoncomplete", function(polygon) { + console.log('end polygon') + that.drawingManager.close() + that.currentPolygon = polygon + if(that.showMarkers.length>0){ + that.judgeWell(polygon) + }else{ + that.judgeAlarmWell(polygon) + } + }) + // 矩形监听器 + this.drawingManager.addEventListener("rectanglecomplete", function(polygon) { + console.log('end rectangle') + that.drawingManager.close() + that.currentPolygon = polygon + if(that.showMarkers.length>0){ + that.judgeWell(polygon) + }else{ + that.judgeAlarmWell(polygon) + } + }); + }) + //实例化鼠标绘制工具 + }, + // 绘制选框 + drawBox(type) { + + if(this.currentPolygon){ + this.map.removeOverlay(this.currentPolygon) + } + if(type=='Polygon'){ + console.log('start polygon') + this.drawingManager.setDrawingMode(BMAP_DRAWING_POLYGON) + + }else if(type==='Rectangle'){ + console.log('start rectangle') + this.drawingManager.setDrawingMode(BMAP_DRAWING_RECTANGLE) + } + this.drawingManager.open() + this.clearDisabled = false + }, + judgeWell(polygon){ + let count = 0 + const points = polygon.getPath() + const poly = new BMap.Polygon(points) + for(const item of this.showMarkers){ + var ppoint = new BMap.Point(parseFloat(item.position.lng), parseFloat(item.position.lat)) + var result = BMapLib.GeoUtils.isPointInPolygon(ppoint, poly); + if(result) count++ + } + this.$message.info('框选区域内有'+count+'个井') + }, + judgeAlarmWell(polygon){ + let count = 0 + const points = polygon.getPath() + const poly = new BMap.Polygon(points) + for(const item of this.alarmWells){ + var ppoint = new BMap.Point(parseFloat(item.position.lng), parseFloat(item.position.lat)) + var result = BMapLib.GeoUtils.isPointInPolygon(ppoint, poly); + if(result) count++ + } + this.$message.info('框选区域内有'+count+'个井') + }, + drawDelete(){ + // if(this.drawingManager.getDrawingMode()){ + this.drawingManager.close() + if(this.currentPolygon){ + this.map.removeOverlay(this.currentPolygon) + this.clearDisabled = true + } + // } } } } @@ -1153,4 +1266,11 @@ margin-bottom: 15px; } } +.draw-tools{ + position: absolute; + top:20px; + right:90px; + z-index: 100; + display: flex; +} diff --git a/static/BMap/js/DrawingManager_min.css b/static/BMap/js/DrawingManager_min.css new file mode 100644 index 0000000..a8a7f38 --- /dev/null +++ b/static/BMap/js/DrawingManager_min.css @@ -0,0 +1 @@ +.BMapLib_Drawing_panel{height:47px;border:1px solid #666;border-radius:5px;overflow:hidden;box-shadow:1px 1px 3px rgba(0,0,0,0.3);float:left}.BMapLib_Drawing .BMapLib_box{border-right:1px solid #d2d2d2;float:left;height:100%;width:64px;height:100%;background-image:url(http://api.map.baidu.com/library/DrawingManager/1.4/src/bg_drawing_tool.png);cursor:pointer}.BMapLib_Drawing .BMapLib_last{border-right:0}.BMapLib_Drawing .BMapLib_hander{background-position:0 0}.BMapLib_Drawing .BMapLib_hander_hover{background-position:0 -52px}.BMapLib_Drawing .BMapLib_marker{background-position:-65px 0}.BMapLib_Drawing .BMapLib_marker_hover{background-position:-65px -52px}.BMapLib_Drawing .BMapLib_circle{background-position:-130px 0}.BMapLib_Drawing .BMapLib_circle_hover{background-position:-130px -52px}.BMapLib_Drawing .BMapLib_polyline{background-position:-195px 0}.BMapLib_Drawing .BMapLib_polyline_hover{background-position:-195px -52px}.BMapLib_Drawing .BMapLib_polygon{background-position:-260px 0}.BMapLib_Drawing .BMapLib_polygon_hover{background-position:-260px -52px}.BMapLib_Drawing .BMapLib_rectangle{background-position:-325px 0}.BMapLib_Drawing .BMapLib_rectangle_hover{background-position:-325px -52px} diff --git a/config/dev.env.js b/config/dev.env.js index 4223837..251ba26 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -10,7 +10,7 @@ // BASE_API: '"http://106.74.146.218:2031"' // BASE_API: '"http://192.168.0.212:8083"' // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://139.198.16.38:8095/smartcity"' // BASE_API: '"http://10.9.39.8:8083"' // BASE_API: '"http://192.168.0.244:8083"' diff --git a/config/prod.env.js b/config/prod.env.js index cba9892..68396cb 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -3,6 +3,6 @@ NODE_ENV: '"production"', // BASE_API: '"http://119.254.103.80:14537"', // BASE_API: '"http://192.168.8.201:8083/smartwell"' - BASE_API: '"http://111.198.10.15:11704/smartwell"' + BASE_API: '"http://111.198.10.15:11707/smartwell"' // BASE_API: '"http://10.9.39.8:8083"' } diff --git a/index.html b/index.html index 4eaa9a8..37f85cd 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,9 @@ + + +
diff --git a/src/assets/global_images/polygon.png b/src/assets/global_images/polygon.png new file mode 100644 index 0000000..eb2791d --- /dev/null +++ b/src/assets/global_images/polygon.png Binary files differ diff --git a/src/assets/global_images/reset.png b/src/assets/global_images/reset.png new file mode 100644 index 0000000..f8ef703 --- /dev/null +++ b/src/assets/global_images/reset.png Binary files differ diff --git a/src/assets/global_images/square.png b/src/assets/global_images/square.png new file mode 100644 index 0000000..999f95d --- /dev/null +++ b/src/assets/global_images/square.png Binary files differ diff --git a/src/views/overview/components/clearTool.vue b/src/views/overview/components/clearTool.vue new file mode 100644 index 0000000..3a049d0 --- /dev/null +++ b/src/views/overview/components/clearTool.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/views/overview/components/drawTool.vue b/src/views/overview/components/drawTool.vue new file mode 100644 index 0000000..da9b175 --- /dev/null +++ b/src/views/overview/components/drawTool.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/views/overview/overviewBdOffline.vue b/src/views/overview/overviewBdOffline.vue index 972e9fb..8c3d6f8 100644 --- a/src/views/overview/overviewBdOffline.vue +++ b/src/views/overview/overviewBdOffline.vue @@ -42,6 +42,11 @@ +
+ + + +
- + { + this.drawingManager = new BMapLib.DrawingManager(map, { + isOpen: false, //是否开启绘制模式 + enableDrawingTool: false, //是否显示工具栏 + drawingToolOptions: { + anchor: BMAP_ANCHOR_TOP_RIGHT, //位置 + offset: new BMap.Size(70, 10), //偏离值 + drawingTypes: [ + BMAP_DRAWING_CIRCLE, + BMAP_DRAWING_POLYGON, + BMAP_DRAWING_RECTANGLE + ], + }, + circleOptions: styleOptions, //圆的样式 + polygonOptions: styleOptions, //多边形的样式 + rectangleOptions: styleOptions //矩形的样式 + }) + // 多边形监听器 + this.drawingManager.addEventListener("polygoncomplete", function(polygon) { + console.log('end polygon') + that.drawingManager.close() + that.currentPolygon = polygon + if(that.showMarkers.length>0){ + that.judgeWell(polygon) + }else{ + that.judgeAlarmWell(polygon) + } + }) + // 矩形监听器 + this.drawingManager.addEventListener("rectanglecomplete", function(polygon) { + console.log('end rectangle') + that.drawingManager.close() + that.currentPolygon = polygon + if(that.showMarkers.length>0){ + that.judgeWell(polygon) + }else{ + that.judgeAlarmWell(polygon) + } + }); + }) + //实例化鼠标绘制工具 + }, + // 绘制选框 + drawBox(type) { + + if(this.currentPolygon){ + this.map.removeOverlay(this.currentPolygon) + } + if(type=='Polygon'){ + console.log('start polygon') + this.drawingManager.setDrawingMode(BMAP_DRAWING_POLYGON) + + }else if(type==='Rectangle'){ + console.log('start rectangle') + this.drawingManager.setDrawingMode(BMAP_DRAWING_RECTANGLE) + } + this.drawingManager.open() + this.clearDisabled = false + }, + judgeWell(polygon){ + let count = 0 + const points = polygon.getPath() + const poly = new BMap.Polygon(points) + for(const item of this.showMarkers){ + var ppoint = new BMap.Point(parseFloat(item.position.lng), parseFloat(item.position.lat)) + var result = BMapLib.GeoUtils.isPointInPolygon(ppoint, poly); + if(result) count++ + } + this.$message.info('框选区域内有'+count+'个井') + }, + judgeAlarmWell(polygon){ + let count = 0 + const points = polygon.getPath() + const poly = new BMap.Polygon(points) + for(const item of this.alarmWells){ + var ppoint = new BMap.Point(parseFloat(item.position.lng), parseFloat(item.position.lat)) + var result = BMapLib.GeoUtils.isPointInPolygon(ppoint, poly); + if(result) count++ + } + this.$message.info('框选区域内有'+count+'个井') + }, + drawDelete(){ + // if(this.drawingManager.getDrawingMode()){ + this.drawingManager.close() + if(this.currentPolygon){ + this.map.removeOverlay(this.currentPolygon) + this.clearDisabled = true + } + // } } } } @@ -1153,4 +1266,11 @@ margin-bottom: 15px; } } +.draw-tools{ + position: absolute; + top:20px; + right:90px; + z-index: 100; + display: flex; +} diff --git a/static/BMap/js/DrawingManager_min.css b/static/BMap/js/DrawingManager_min.css new file mode 100644 index 0000000..a8a7f38 --- /dev/null +++ b/static/BMap/js/DrawingManager_min.css @@ -0,0 +1 @@ +.BMapLib_Drawing_panel{height:47px;border:1px solid #666;border-radius:5px;overflow:hidden;box-shadow:1px 1px 3px rgba(0,0,0,0.3);float:left}.BMapLib_Drawing .BMapLib_box{border-right:1px solid #d2d2d2;float:left;height:100%;width:64px;height:100%;background-image:url(http://api.map.baidu.com/library/DrawingManager/1.4/src/bg_drawing_tool.png);cursor:pointer}.BMapLib_Drawing .BMapLib_last{border-right:0}.BMapLib_Drawing .BMapLib_hander{background-position:0 0}.BMapLib_Drawing .BMapLib_hander_hover{background-position:0 -52px}.BMapLib_Drawing .BMapLib_marker{background-position:-65px 0}.BMapLib_Drawing .BMapLib_marker_hover{background-position:-65px -52px}.BMapLib_Drawing .BMapLib_circle{background-position:-130px 0}.BMapLib_Drawing .BMapLib_circle_hover{background-position:-130px -52px}.BMapLib_Drawing .BMapLib_polyline{background-position:-195px 0}.BMapLib_Drawing .BMapLib_polyline_hover{background-position:-195px -52px}.BMapLib_Drawing .BMapLib_polygon{background-position:-260px 0}.BMapLib_Drawing .BMapLib_polygon_hover{background-position:-260px -52px}.BMapLib_Drawing .BMapLib_rectangle{background-position:-325px 0}.BMapLib_Drawing .BMapLib_rectangle_hover{background-position:-325px -52px} diff --git a/static/BMap/js/DrawingManager_min.js b/static/BMap/js/DrawingManager_min.js new file mode 100644 index 0000000..49e0cee --- /dev/null +++ b/static/BMap/js/DrawingManager_min.js @@ -0,0 +1,4 @@ +var BMapLib=window.BMapLib=BMapLib||{};var BMAP_DRAWING_MARKER="marker",BMAP_DRAWING_POLYLINE="polyline",BMAP_DRAWING_CIRCLE="circle",BMAP_DRAWING_RECTANGLE="rectangle",BMAP_DRAWING_POLYGON="polygon";(function(){var b=b||{guid:"$BAIDU$"};(function(){window[b.guid]={};b.extend=function(i,g){for(var h in g){if(g.hasOwnProperty(h)){i[h]=g[h]}}return i};b.lang=b.lang||{};b.lang.guid=function(){return"TANGRAM__"+(window[b.guid]._counter++).toString(36)};window[b.guid]._counter=window[b.guid]._counter||1;window[b.guid]._instances=window[b.guid]._instances||{};b.lang.Class=function(g){this.guid=g||b.lang.guid();window[b.guid]._instances[this.guid]=this};window[b.guid]._instances=window[b.guid]._instances||{};b.lang.isString=function(g){return"[object String]"==Object.prototype.toString.call(g)};b.lang.isFunction=function(g){return"[object Function]"==Object.prototype.toString.call(g)};b.lang.Class.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};b.lang.Class.prototype.dispose=function(){delete window[b.guid]._instances[this.guid];for(var g in this){if(!b.lang.isFunction(this[g])){delete this[g]}}this.disposed=true};b.lang.Event=function(g,h){this.type=g;this.returnValue=true;this.target=h||null;this.currentTarget=null};b.lang.Class.prototype.addEventListener=function(j,i,h){if(!b.lang.isFunction(i)){return}!this.__listeners&&(this.__listeners={});var g=this.__listeners,k;if(typeof h=="string"&&h){if(/[^\w\-]/.test(h)){throw ("nonstandard key:"+h)}else{i.hashCode=h;k=h}}j.indexOf("on")!=0&&(j="on"+j);typeof g[j]!="object"&&(g[j]={});k=k||b.lang.guid();i.hashCode=k;g[j][k]=i};b.lang.Class.prototype.removeEventListener=function(i,h){if(b.lang.isFunction(h)){h=h.hashCode}else{if(!b.lang.isString(h)){return}}!this.__listeners&&(this.__listeners={});i.indexOf("on")!=0&&(i="on"+i);var g=this.__listeners;if(!g[i]){return}g[i][h]&&delete g[i][h]};b.lang.Class.prototype.dispatchEvent=function(k,g){if(b.lang.isString(k)){k=new b.lang.Event(k)}!this.__listeners&&(this.__listeners={});g=g||{};for(var j in g){k[j]=g[j]}var j,h=this.__listeners,l=k.type;k.target=k.target||this;k.currentTarget=this;l.indexOf("on")!=0&&(l="on"+l);b.lang.isFunction(this[l])&&this[l].apply(this,arguments);if(typeof h[l]=="object"){for(j in h[l]){h[l][j].apply(this,arguments)}}return k.returnValue};b.lang.inherits=function(m,k,j){var i,l,g=m.prototype,h=new Function();h.prototype=k.prototype;l=m.prototype=new h();for(i in g){l[i]=g[i]}m.prototype.constructor=m;m.superClass=k.prototype;if("string"==typeof j){l._className=j}};b.dom=b.dom||{};b._g=b.dom._g=function(g){if(b.lang.isString(g)){return document.getElementById(g)}return g};b.g=b.dom.g=function(g){if("string"==typeof g||g instanceof String){return document.getElementById(g)}else{if(g&&g.nodeName&&(g.nodeType==1||g.nodeType==9)){return g}}return null};b.insertHTML=b.dom.insertHTML=function(j,g,i){j=b.dom.g(j);var h,k;if(j.insertAdjacentHTML){j.insertAdjacentHTML(g,i)}else{h=j.ownerDocument.createRange();g=g.toUpperCase();if(g=="AFTERBEGIN"||g=="BEFOREEND"){h.selectNodeContents(j);h.collapse(g=="AFTERBEGIN")}else{k=g=="BEFOREBEGIN";h[k?"setStartBefore":"setEndAfter"](j);h.collapse(k)}h.insertNode(h.createContextualFragment(i))}return j};b.ac=b.dom.addClass=function(n,o){n=b.dom.g(n);var h=o.split(/\s+/),g=n.className,m=" "+g+" ",k=0,j=h.length;for(;k=h.width-20||i.y<=50||i.y>=h.height-10){if(i.x<=20){this._panByX=8}else{if(i.x>=h.width-20){this._panByX=-8}}if(i.y<=50){this._panByY=8}else{if(i.y>=h.height-10){this._panByY=-8}}if(!this._edgeMoveTimer){this._edgeMoveTimer=setInterval(function(){h.panBy(o._panByX,o._panByY,{"noAnimation":true})},30)}}else{if(this._edgeMoveTimer){clearInterval(this._edgeMoveTimer);this._edgeMoveTimer=null}}};e.prototype._adjustSize=function(g){this.container.style.width=g.width+"px";this.container.style.height=g.height+"px"};e.prototype.getDrawPoint=function(l){var k=this._map,j=b.getTarget(l),h=l.offsetX||l.layerX||0,m=l.offsetY||l.layerY||0;if(j.nodeType!=1){j=j.parentNode}while(j&&j!=k.getContainer()){if(!(j.clientWidth==0&&j.clientHeight==0&&j.offsetParent&&j.offsetParent.nodeName=="TD")){h+=j.offsetLeft||0;m+=j.offsetTop||0}j=j.offsetParent}var i=new BMap.Pixel(h,m);var g=k.pixelToPoint(i);return g};function a(h,g){this.drawingManager=h;g=this.drawingToolOptions=g||{};this.defaultAnchor=BMAP_ANCHOR_TOP_LEFT;this.defaultOffset=new BMap.Size(10,10);this.defaultDrawingModes=[BMAP_DRAWING_MARKER,BMAP_DRAWING_CIRCLE,BMAP_DRAWING_POLYLINE,BMAP_DRAWING_POLYGON,BMAP_DRAWING_RECTANGLE];if(g.drawingModes){this.drawingModes=g.drawingModes}else{this.drawingModes=this.defaultDrawingModes}if(g.anchor){this.setAnchor(g.anchor)}if(g.offset){this.setOffset(g.offset)}}a.prototype=new BMap.Control();a.prototype.initialize=function(i){var h=this.container=document.createElement("div");h.className="BMapLib_Drawing";var g=this.panel=document.createElement("div");g.className="BMapLib_Drawing_panel";if(this.drawingToolOptions&&this.drawingToolOptions.scale){this._setScale(this.drawingToolOptions.scale)}h.appendChild(g);g.innerHTML=this._generalHtml();this._bind(g);i.getContainer().appendChild(h);return h};a.prototype._generalHtml=function(m){var h={};h["hander"]="拖动地图";h[BMAP_DRAWING_MARKER]="画点";h[BMAP_DRAWING_CIRCLE]="画圆";h[BMAP_DRAWING_POLYLINE]="画折线";h[BMAP_DRAWING_POLYGON]="画多边形";h[BMAP_DRAWING_RECTANGLE]="画矩形";var n=function(o,i){return''};var k=[];k.push(n("BMapLib_box BMapLib_hander","hander"));for(var j=0,g=this.drawingModes.length; + j + + +
diff --git a/src/assets/global_images/polygon.png b/src/assets/global_images/polygon.png new file mode 100644 index 0000000..eb2791d --- /dev/null +++ b/src/assets/global_images/polygon.png Binary files differ diff --git a/src/assets/global_images/reset.png b/src/assets/global_images/reset.png new file mode 100644 index 0000000..f8ef703 --- /dev/null +++ b/src/assets/global_images/reset.png Binary files differ diff --git a/src/assets/global_images/square.png b/src/assets/global_images/square.png new file mode 100644 index 0000000..999f95d --- /dev/null +++ b/src/assets/global_images/square.png Binary files differ diff --git a/src/views/overview/components/clearTool.vue b/src/views/overview/components/clearTool.vue new file mode 100644 index 0000000..3a049d0 --- /dev/null +++ b/src/views/overview/components/clearTool.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/views/overview/components/drawTool.vue b/src/views/overview/components/drawTool.vue new file mode 100644 index 0000000..da9b175 --- /dev/null +++ b/src/views/overview/components/drawTool.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/src/views/overview/overviewBdOffline.vue b/src/views/overview/overviewBdOffline.vue index 972e9fb..8c3d6f8 100644 --- a/src/views/overview/overviewBdOffline.vue +++ b/src/views/overview/overviewBdOffline.vue @@ -42,6 +42,11 @@ +
+ + + +
- + { + this.drawingManager = new BMapLib.DrawingManager(map, { + isOpen: false, //是否开启绘制模式 + enableDrawingTool: false, //是否显示工具栏 + drawingToolOptions: { + anchor: BMAP_ANCHOR_TOP_RIGHT, //位置 + offset: new BMap.Size(70, 10), //偏离值 + drawingTypes: [ + BMAP_DRAWING_CIRCLE, + BMAP_DRAWING_POLYGON, + BMAP_DRAWING_RECTANGLE + ], + }, + circleOptions: styleOptions, //圆的样式 + polygonOptions: styleOptions, //多边形的样式 + rectangleOptions: styleOptions //矩形的样式 + }) + // 多边形监听器 + this.drawingManager.addEventListener("polygoncomplete", function(polygon) { + console.log('end polygon') + that.drawingManager.close() + that.currentPolygon = polygon + if(that.showMarkers.length>0){ + that.judgeWell(polygon) + }else{ + that.judgeAlarmWell(polygon) + } + }) + // 矩形监听器 + this.drawingManager.addEventListener("rectanglecomplete", function(polygon) { + console.log('end rectangle') + that.drawingManager.close() + that.currentPolygon = polygon + if(that.showMarkers.length>0){ + that.judgeWell(polygon) + }else{ + that.judgeAlarmWell(polygon) + } + }); + }) + //实例化鼠标绘制工具 + }, + // 绘制选框 + drawBox(type) { + + if(this.currentPolygon){ + this.map.removeOverlay(this.currentPolygon) + } + if(type=='Polygon'){ + console.log('start polygon') + this.drawingManager.setDrawingMode(BMAP_DRAWING_POLYGON) + + }else if(type==='Rectangle'){ + console.log('start rectangle') + this.drawingManager.setDrawingMode(BMAP_DRAWING_RECTANGLE) + } + this.drawingManager.open() + this.clearDisabled = false + }, + judgeWell(polygon){ + let count = 0 + const points = polygon.getPath() + const poly = new BMap.Polygon(points) + for(const item of this.showMarkers){ + var ppoint = new BMap.Point(parseFloat(item.position.lng), parseFloat(item.position.lat)) + var result = BMapLib.GeoUtils.isPointInPolygon(ppoint, poly); + if(result) count++ + } + this.$message.info('框选区域内有'+count+'个井') + }, + judgeAlarmWell(polygon){ + let count = 0 + const points = polygon.getPath() + const poly = new BMap.Polygon(points) + for(const item of this.alarmWells){ + var ppoint = new BMap.Point(parseFloat(item.position.lng), parseFloat(item.position.lat)) + var result = BMapLib.GeoUtils.isPointInPolygon(ppoint, poly); + if(result) count++ + } + this.$message.info('框选区域内有'+count+'个井') + }, + drawDelete(){ + // if(this.drawingManager.getDrawingMode()){ + this.drawingManager.close() + if(this.currentPolygon){ + this.map.removeOverlay(this.currentPolygon) + this.clearDisabled = true + } + // } } } } @@ -1153,4 +1266,11 @@ margin-bottom: 15px; } } +.draw-tools{ + position: absolute; + top:20px; + right:90px; + z-index: 100; + display: flex; +} diff --git a/static/BMap/js/DrawingManager_min.css b/static/BMap/js/DrawingManager_min.css new file mode 100644 index 0000000..a8a7f38 --- /dev/null +++ b/static/BMap/js/DrawingManager_min.css @@ -0,0 +1 @@ +.BMapLib_Drawing_panel{height:47px;border:1px solid #666;border-radius:5px;overflow:hidden;box-shadow:1px 1px 3px rgba(0,0,0,0.3);float:left}.BMapLib_Drawing .BMapLib_box{border-right:1px solid #d2d2d2;float:left;height:100%;width:64px;height:100%;background-image:url(http://api.map.baidu.com/library/DrawingManager/1.4/src/bg_drawing_tool.png);cursor:pointer}.BMapLib_Drawing .BMapLib_last{border-right:0}.BMapLib_Drawing .BMapLib_hander{background-position:0 0}.BMapLib_Drawing .BMapLib_hander_hover{background-position:0 -52px}.BMapLib_Drawing .BMapLib_marker{background-position:-65px 0}.BMapLib_Drawing .BMapLib_marker_hover{background-position:-65px -52px}.BMapLib_Drawing .BMapLib_circle{background-position:-130px 0}.BMapLib_Drawing .BMapLib_circle_hover{background-position:-130px -52px}.BMapLib_Drawing .BMapLib_polyline{background-position:-195px 0}.BMapLib_Drawing .BMapLib_polyline_hover{background-position:-195px -52px}.BMapLib_Drawing .BMapLib_polygon{background-position:-260px 0}.BMapLib_Drawing .BMapLib_polygon_hover{background-position:-260px -52px}.BMapLib_Drawing .BMapLib_rectangle{background-position:-325px 0}.BMapLib_Drawing .BMapLib_rectangle_hover{background-position:-325px -52px} diff --git a/static/BMap/js/DrawingManager_min.js b/static/BMap/js/DrawingManager_min.js new file mode 100644 index 0000000..49e0cee --- /dev/null +++ b/static/BMap/js/DrawingManager_min.js @@ -0,0 +1,4 @@ +var BMapLib=window.BMapLib=BMapLib||{};var BMAP_DRAWING_MARKER="marker",BMAP_DRAWING_POLYLINE="polyline",BMAP_DRAWING_CIRCLE="circle",BMAP_DRAWING_RECTANGLE="rectangle",BMAP_DRAWING_POLYGON="polygon";(function(){var b=b||{guid:"$BAIDU$"};(function(){window[b.guid]={};b.extend=function(i,g){for(var h in g){if(g.hasOwnProperty(h)){i[h]=g[h]}}return i};b.lang=b.lang||{};b.lang.guid=function(){return"TANGRAM__"+(window[b.guid]._counter++).toString(36)};window[b.guid]._counter=window[b.guid]._counter||1;window[b.guid]._instances=window[b.guid]._instances||{};b.lang.Class=function(g){this.guid=g||b.lang.guid();window[b.guid]._instances[this.guid]=this};window[b.guid]._instances=window[b.guid]._instances||{};b.lang.isString=function(g){return"[object String]"==Object.prototype.toString.call(g)};b.lang.isFunction=function(g){return"[object Function]"==Object.prototype.toString.call(g)};b.lang.Class.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};b.lang.Class.prototype.dispose=function(){delete window[b.guid]._instances[this.guid];for(var g in this){if(!b.lang.isFunction(this[g])){delete this[g]}}this.disposed=true};b.lang.Event=function(g,h){this.type=g;this.returnValue=true;this.target=h||null;this.currentTarget=null};b.lang.Class.prototype.addEventListener=function(j,i,h){if(!b.lang.isFunction(i)){return}!this.__listeners&&(this.__listeners={});var g=this.__listeners,k;if(typeof h=="string"&&h){if(/[^\w\-]/.test(h)){throw ("nonstandard key:"+h)}else{i.hashCode=h;k=h}}j.indexOf("on")!=0&&(j="on"+j);typeof g[j]!="object"&&(g[j]={});k=k||b.lang.guid();i.hashCode=k;g[j][k]=i};b.lang.Class.prototype.removeEventListener=function(i,h){if(b.lang.isFunction(h)){h=h.hashCode}else{if(!b.lang.isString(h)){return}}!this.__listeners&&(this.__listeners={});i.indexOf("on")!=0&&(i="on"+i);var g=this.__listeners;if(!g[i]){return}g[i][h]&&delete g[i][h]};b.lang.Class.prototype.dispatchEvent=function(k,g){if(b.lang.isString(k)){k=new b.lang.Event(k)}!this.__listeners&&(this.__listeners={});g=g||{};for(var j in g){k[j]=g[j]}var j,h=this.__listeners,l=k.type;k.target=k.target||this;k.currentTarget=this;l.indexOf("on")!=0&&(l="on"+l);b.lang.isFunction(this[l])&&this[l].apply(this,arguments);if(typeof h[l]=="object"){for(j in h[l]){h[l][j].apply(this,arguments)}}return k.returnValue};b.lang.inherits=function(m,k,j){var i,l,g=m.prototype,h=new Function();h.prototype=k.prototype;l=m.prototype=new h();for(i in g){l[i]=g[i]}m.prototype.constructor=m;m.superClass=k.prototype;if("string"==typeof j){l._className=j}};b.dom=b.dom||{};b._g=b.dom._g=function(g){if(b.lang.isString(g)){return document.getElementById(g)}return g};b.g=b.dom.g=function(g){if("string"==typeof g||g instanceof String){return document.getElementById(g)}else{if(g&&g.nodeName&&(g.nodeType==1||g.nodeType==9)){return g}}return null};b.insertHTML=b.dom.insertHTML=function(j,g,i){j=b.dom.g(j);var h,k;if(j.insertAdjacentHTML){j.insertAdjacentHTML(g,i)}else{h=j.ownerDocument.createRange();g=g.toUpperCase();if(g=="AFTERBEGIN"||g=="BEFOREEND"){h.selectNodeContents(j);h.collapse(g=="AFTERBEGIN")}else{k=g=="BEFOREBEGIN";h[k?"setStartBefore":"setEndAfter"](j);h.collapse(k)}h.insertNode(h.createContextualFragment(i))}return j};b.ac=b.dom.addClass=function(n,o){n=b.dom.g(n);var h=o.split(/\s+/),g=n.className,m=" "+g+" ",k=0,j=h.length;for(;k=h.width-20||i.y<=50||i.y>=h.height-10){if(i.x<=20){this._panByX=8}else{if(i.x>=h.width-20){this._panByX=-8}}if(i.y<=50){this._panByY=8}else{if(i.y>=h.height-10){this._panByY=-8}}if(!this._edgeMoveTimer){this._edgeMoveTimer=setInterval(function(){h.panBy(o._panByX,o._panByY,{"noAnimation":true})},30)}}else{if(this._edgeMoveTimer){clearInterval(this._edgeMoveTimer);this._edgeMoveTimer=null}}};e.prototype._adjustSize=function(g){this.container.style.width=g.width+"px";this.container.style.height=g.height+"px"};e.prototype.getDrawPoint=function(l){var k=this._map,j=b.getTarget(l),h=l.offsetX||l.layerX||0,m=l.offsetY||l.layerY||0;if(j.nodeType!=1){j=j.parentNode}while(j&&j!=k.getContainer()){if(!(j.clientWidth==0&&j.clientHeight==0&&j.offsetParent&&j.offsetParent.nodeName=="TD")){h+=j.offsetLeft||0;m+=j.offsetTop||0}j=j.offsetParent}var i=new BMap.Pixel(h,m);var g=k.pixelToPoint(i);return g};function a(h,g){this.drawingManager=h;g=this.drawingToolOptions=g||{};this.defaultAnchor=BMAP_ANCHOR_TOP_LEFT;this.defaultOffset=new BMap.Size(10,10);this.defaultDrawingModes=[BMAP_DRAWING_MARKER,BMAP_DRAWING_CIRCLE,BMAP_DRAWING_POLYLINE,BMAP_DRAWING_POLYGON,BMAP_DRAWING_RECTANGLE];if(g.drawingModes){this.drawingModes=g.drawingModes}else{this.drawingModes=this.defaultDrawingModes}if(g.anchor){this.setAnchor(g.anchor)}if(g.offset){this.setOffset(g.offset)}}a.prototype=new BMap.Control();a.prototype.initialize=function(i){var h=this.container=document.createElement("div");h.className="BMapLib_Drawing";var g=this.panel=document.createElement("div");g.className="BMapLib_Drawing_panel";if(this.drawingToolOptions&&this.drawingToolOptions.scale){this._setScale(this.drawingToolOptions.scale)}h.appendChild(g);g.innerHTML=this._generalHtml();this._bind(g);i.getContainer().appendChild(h);return h};a.prototype._generalHtml=function(m){var h={};h["hander"]="拖动地图";h[BMAP_DRAWING_MARKER]="画点";h[BMAP_DRAWING_CIRCLE]="画圆";h[BMAP_DRAWING_POLYLINE]="画折线";h[BMAP_DRAWING_POLYGON]="画多边形";h[BMAP_DRAWING_RECTANGLE]="画矩形";var n=function(o,i){return''};var k=[];k.push(n("BMapLib_box BMapLib_hander","hander"));for(var j=0,g=this.drawingModes.length; + j=e.lng&&f.lng<=h.lng&&f.lat>=e.lat&&f.lat<=h.lat)};b.isPointInCircle=function(e,h){if(!(e instanceof BMap.Point)||!(h instanceof BMap.Circle)){return false}var i=h.getCenter();var g=h.getRadius();var f=b.getDistance(e,i);if(f<=g){return true}else{return false}};b.isPointOnPolyline=function(f,h){if(!(f instanceof BMap.Point)||!(h instanceof BMap.Polyline)){return false}var e=h.getBounds();if(!this.isPointInRect(f,e)){return false}var m=h.getPath();for(var k=0;k=Math.min(l.lng,j.lng)&&f.lng<=Math.max(l.lng,j.lng)&&f.lat>=Math.min(l.lat,j.lat)&&f.lat<=Math.max(l.lat,j.lat)){var g=(l.lng-f.lng)*(j.lat-f.lat)-(j.lng-f.lng)*(l.lat-f.lat);if(g<2e-10&&g>-2e-10){return true}}}return false};b.isPointInPolygon=function(o,l){if(!(o instanceof BMap.Point)||!(l instanceof BMap.Polygon)){return false}var k=l.getBounds();if(!this.isPointInRect(o,k)){return false}var t=l.getPath();var h=t.length;var n=true;var j=0;var g=2e-10;var s,q;var e=o;s=t[0];for(var f=1;f<=h;++f){if(e.equals(s)){return n}q=t[f%h];if(e.latMath.max(s.lat,q.lat)){s=q;continue}if(e.lat>Math.min(s.lat,q.lat)&&e.lat=Math.min(s.lng,q.lng)){return n}if(s.lng==q.lng){if(s.lng==e.lng){return n}else{++j}}else{var r=(e.lat-s.lat)*(q.lng-s.lng)/(q.lat-s.lat)+s.lng;if(Math.abs(e.lng-r)=Math.min(s.lat,m.lat)&&e.lat<=Math.max(s.lat,m.lat)){++j}else{j+=2}}}s=q}if(j%2==0){return false}else{return true}};b.degreeToRad=function(e){return Math.PI*e/180};b.radToDegree=function(e){return(180*e)/Math.PI};function d(g,f,e){if(f!=null){g=Math.max(g,f)}if(e!=null){g=Math.min(g,e)}return g}function c(g,f,e){while(g>e){g-=e-f}while(g0){y+=m;k++}else{x+=m;h++}}var u,r;u=y+(2*Math.PI*h-x);r=(2*Math.PI*k-y)+x;if(y>x){if((u-(B-2)*Math.PI)<1){f=u}else{f=r}}else{if((r-(B-2)*Math.PI)<1){f=r}else{f=u}}w=(f-(B-2)*Math.PI)*n*n;return w}})();