| | |
| | | iconAnchor: [25, 25] |
| | | }) |
| | | }) |
| | | /* marker.bindTooltip(getSolidWasteData[i].Name, { |
| | | permanent: true, |
| | | offset: [0, 14], |
| | | direction: 'bottom', |
| | | className: 'company-bindTooltip' |
| | | }) */ |
| | | layer.addLayer(marker) |
| | | } |
| | | } |
| | |
| | | this.clickListener = (e) => { |
| | | // 点击marker的pulse()光波 |
| | | this.animalService.pulseEffect(e.latlng) |
| | | /* flyTo()弹出框平移事件 */ |
| | | // this.setPanTo(e.latlng, 200) |
| | | /* 点击数据的接口请求 */ |
| | | this.requestSolidWasteData(e).then(e) |
| | | } |
| | |
| | | instance.$mount() |
| | | document.body.appendChild(instance.$el) |
| | | instance.setData(resultBasic.Result.DataInfo, resultDetailed, 'gufei') |
| | | /* flyTo()弹出框平移事件 */ |
| | | this.setPanTo(e.latlng, 200) |
| | | } |
| | | |
| | | // flayTo() |
| | | // this.setPanTo = (pos, value) => { |
| | | // var position = pos |
| | | // position = this.map.latLngToLayerPoint(position) |
| | | // position.y += value |
| | | // position = this.map.layerPointToLatLng(position) |
| | | // this.map.flyTo(position) |
| | | // } |
| | | this.setPanTo = (pos, value) => { |
| | | var position = pos |
| | | position = window.map.latLngToLayerPoint(position) |
| | | position.y += value |
| | | position = window.map.layerPointToLatLng(position) |
| | | window.map.flyTo(position) |
| | | } |
| | | } |