| | |
| | | // 定义类型 用来区分数据的不同 |
| | | const testValue = data[i].ContrLevel |
| | | const iconUrl = this.differentTypes(testValue) |
| | | const marker = L.marker.magic([positionX, positionY], { |
| | | const marker = L.marker([positionX, positionY], { |
| | | test: data[i], |
| | | icon: L.icon({ |
| | | iconUrl: iconUrl, |
| | | iconSize: [50, 50], |
| | | iconAnchor: [25, 25] |
| | | iconSize: [35, 35], |
| | | iconAnchor: [18, 18] |
| | | }) |
| | | }) |
| | | layer.addLayer(marker) |
| | |
| | | const PublicBounced = window.Vue.extend(publicBounced) |
| | | const instance = new PublicBounced() |
| | | instance.setWaterData(e.layer.options.test, result.Result.DataInfo, drawback.Result.DataInfo, 'feishui') |
| | | console.log(e.layer.options.test) |
| | | // console.log(e.layer.options.test) |
| | | instance.$mount() |
| | | document.body.appendChild(instance.$el) |
| | | this.setPanTo(e.latlng, 240) |
| | | this.setPanTo(e.latlng, 80) |
| | | } |
| | | |
| | | // 根据返回值的不同标记不同图片 |