| | |
| | | * @param L leaflet对象 |
| | | */ |
| | | this.init = async (layer, L) => { |
| | | this.animalService = new AnimalService({ L: L, layer: layer }) |
| | | this.animalService = new AnimalService({ |
| | | L: L, |
| | | layer: layer |
| | | }) |
| | | const res = await mapApi.GetWasteGas() |
| | | const data = res.Result.DataInfo || {} |
| | | console.log(data) |
| | |
| | | var iconUrl = this.differentTypes(ContrLevel) |
| | | |
| | | const marker = L.marker.magic([positionX, positionY], { |
| | | test: data[i], |
| | | icon: L.icon({ |
| | | iconUrl: iconUrl, |
| | | iconSize: [50, 50], |
| | | iconSize: [20, 20], |
| | | iconAnchor: [25, 25] |
| | | }) |
| | | }) |
| | |
| | | } |
| | | |
| | | this.bindTooltip = (layer) => { |
| | | console.log(layer) |
| | | return '废气点' |
| | | return layer.options.test.Name |
| | | } |
| | | |
| | | this.clickListener = async (e) => { |