Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
| | |
| | | import WfsLayerService from './WfsLayerService' |
| | | import { clone } from '../../../utils/utils' |
| | | import { clone, pulseEffect } from '../../../utils/utils' |
| | | import { logicMapper, SERVICE_TYPE } from '../../../conf/Constants' |
| | | import WmsLayerService from './WmsLayerService' |
| | | import AnimalService from './AnimalService' |
| | | |
| | | /** |
| | | * init 只初始化一次 |
| | |
| | | this.layersLogic = {} |
| | | this.minZoomLayers = {} |
| | | this.wmsLayers = [] |
| | | // todo 待优化,wmslayerservice调用,放这里不合适 |
| | | this.clickSwitch = true // 图层点击弹窗开关 |
| | | this.animalService = new AnimalService({ L: this.L }) |
| | | this.hightlightLayer = options.L.featureGroup({}).addTo(window.map) |
| | | } |
| | | |
| | |
| | | if (point.length > 2) { |
| | | point = [point[0], point[1]] |
| | | } |
| | | this.animalService.pulseEffect(point.reverse()) |
| | | pulseEffect(point.reverse()) |
| | | /* var myIcon = this.L.divIcon({ className: 'my-div-icon' }) |
| | | this.L.marker(feature.geometry.coordinates.reverse(), { |
| | | icon: myIcon |
| | |
| | | var size = this.map.getSize() |
| | | // const bbox = this.L.latLngBounds(this.L.latLng(e.latlng.lng, e.latlng.lat)).toBBoxString() |
| | | const layers = this.wmsLayerList.getLayers() |
| | | const filter = this.wmsLayerList.getFilters() |
| | | if (layers.length > 0) { |
| | | const params = Object.assign({ |
| | | LAYERS: layers, |
| | |
| | | Y: Math.round(point.y), |
| | | BBOX: this.map.getBounds().toBBoxString() |
| | | }, this.params) |
| | | if (filter.length > 0) { |
| | | params.cql_filter = filter |
| | | } |
| | | AjaxUtils.get4JsonDataByUrl(WMS_URL, params, (res) => { |
| | | const features = res.data.features |
| | | /** |
| | |
| | | const mapOptions = { |
| | | crs: L.CRS.EPSG4326, |
| | | minZoom: 3, |
| | | maxZoom: 17, |
| | | maxZoom: 21, |
| | | // center: [26, 104], |
| | | center: [34.828558921813965, 117.41676807403564], |
| | | zoom: 5, |