| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 17:00:30 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-28 14:16:16 |
| | | * @LastEditTime: 2023-03-02 10:05:29 |
| | | * @FilePath: \srs-police-affairs\src\components\map\index.vue |
| | | * @Description: 公用地图组件 |
| | | * |
| | |
| | | </div> |
| | | |
| | | <map-popup></map-popup> |
| | | |
| | | <activity-police-popup></activity-police-popup> |
| | | |
| | | <assemble-box></assemble-box> |
| | | </div> |
| | |
| | | ] |
| | | |
| | | import mapPopup from './components/mapPopup.vue' |
| | | import activityPolicePopup from './components/activityPolicePopup.vue' |
| | | |
| | | |
| | | |
| | | export default { |
| | | name: 'mapBox', |
| | | |
| | | components: { mapPopup }, |
| | | components: { mapPopup, activityPolicePopup }, |
| | | |
| | | data () { |
| | | return { |
| | |
| | | |
| | | 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,params.mouseOverIcident) |
| | | that.layerPointAdd(params.layerName, params.type, params.layerType, params.params, params.distanceDisplayCondition, params.incident, params.mouseOverIncident, params.mouseOutIncident) |
| | | }) |
| | | |
| | | this.$EventBus.$on('layerPolygonAdd', (params) => { |
| | |
| | | layerPointAdd (layerName, type, layerType = 'VectorLayer', params, distanceDisplayCondition = { |
| | | near: 0, //最近距离 |
| | | far: Number.MAX_VALUE //最远距离 |
| | | }, incident = (e) => { },mouseOverIcident = (e) => { }) { |
| | | }, incident = (e) => { }, mouseOverIncident = (e) => { }, mouseOutIncident = (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) |
| | | pointElement.on(global.DC.MouseEventType.MOUSE_OVER, mouseOverIncident) |
| | | pointElement.on(global.DC.MouseEventType.MOUSE_OUT, mouseOutIncident) |
| | | } 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({ |