| | |
| | | |
| | | // 删除所有地图绘制元素 |
| | | removeDraw () { |
| | | drawLayers != null && drawLayers.clear() |
| | | // drawLayers != null && drawLayers.clear() |
| | | addPoliceIconOverlayData!= null && !addPoliceIconOverlayData.attrParams && addPoliceIconOverlayData.remove() |
| | | }, |
| | | |
| | | removeDrawArrow () { |
| | | // drawArrowLayers != null && drawArrowLayers.clear() |
| | | addPlotOverlayData != null && addPlotOverlayData.remove() |
| | | labelOverLayerID = [] |
| | | }, |
| | | |
| | | clearDrawArrow() { |
| | | drawArrowLayers != null && drawArrowLayers.clear() |
| | | }, |
| | | |
| | | // 编辑标绘位置 |
| | |
| | | |
| | | addNewPolice(data,type){ |
| | | let positionObj = this.$parent.convertBillboardPositionDate(data, type) |
| | | let positionArr = data.position.slice(12, data.position.length - 2).split(',')[0].split(' ') |
| | | let positionArr = data.position.slice(7, data.position.length - 2).split(',')[0].split(' ') |
| | | let position = new global.DC.Position(Number(positionArr[0]), Number(positionArr[1])) |
| | | let point = new global.DC.Point(position) |
| | | let color = '' |
| | |
| | | let b = parseInt(data.color.slice(5, 7), 16) |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255) |
| | | } |
| | | console.log(positionObj,position,point,999); |
| | | point.attrParams = positionObj |
| | | drawLayers.addOverlay(point) |
| | | point.setStyle({ |
| | | "color": global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150), //颜色 |
| | | "color": color, //颜色 |
| | | "outlineColor": color, //边框颜色 |
| | | "outlineWidth": 0, //边框大小, |
| | | "pixelSize": 82, |
| | | "pixelSize": 32, |
| | | }) |
| | | point.on(global.DC.MouseEventType.CLICK, this.$parent.overlayTypeClick) |
| | | point.on(global.DC.MouseEventType.MOUSE_OVER, this.$parent.pointMouseOver) |