| | |
| | | |
| | | this.$EventBus.$on('layerPointAdd', (params) => { |
| | | // eslint-disable-next-line no-unused-vars |
| | | that.layerPointAdd(params.layerName, params.type, params.layerType, params.params, params.distanceDisplayCondition, params.incident) |
| | | that.layerPointAdd(params.layerName, params.type, params.layerType, params.params, params.distanceDisplayCondition, params.incident,params.mouseOverIcident) |
| | | }) |
| | | |
| | | this.$EventBus.$on('layerPolygonAdd', (params) => { |
| | |
| | | layerPointAdd (layerName, type, layerType = 'VectorLayer', params, distanceDisplayCondition = { |
| | | near: 0, //最近距离 |
| | | far: Number.MAX_VALUE //最远距离 |
| | | }, incident = (e) => { }) { |
| | | }, incident = (e) => { },mouseOverIcident = (e) => { }) { |
| | | if (!layersObjcect[layerName] || layersObjcect[layerName] == null) { |
| | | this.mapAddLayer(layerName, layerType) |
| | | } |
| | |
| | | pointElement.attrParams = params |
| | | layersObjcect[layerName].addOverlay(pointElement) |
| | | pointElement.on(global.DC.MouseEventType.CLICK, incident) |
| | | pointElement.on(global.DC.MouseEventType.MOUSE_OVER, mouseOverIcident) |
| | | |
| | | } else if (type == "label") { |
| | | labelElement = new global.DC.Label(new global.DC.Position(Number(params.lng), Number(params.lat), Number(params.alt)), params.text) |
| | | labelElement.setStyle({ |