| | |
| | | this.geojsonArray = {} // 初始的geojson集 |
| | | this.layerConfig = {} |
| | | this.regex = /\{(.+?)\}/g // 匹配{} |
| | | this.popupComp = null |
| | | } |
| | | |
| | | getTileLayer (code) { |
| | |
| | | /** |
| | | * 根据配置文件初始化业务底图 |
| | | */ |
| | | initServiceLayers (layerConfig) { |
| | | initServiceLayers (layerConfig, popupComp) { |
| | | this.layerConfig = layerConfig |
| | | this.popupComp = popupComp |
| | | this.loadLayers(layerConfig.mapConfig.Layers.LayerSewersLine) |
| | | // this.loadLayers(layerConfig.mapConfig.Layers.layerSewersPoint) |
| | | this.loadLayers(layerConfig.mapConfig.Layers.layerSewersPoint) |
| | | } |
| | | |
| | | /** |
| | |
| | | }) |
| | | } |
| | | }).bindPopup(function (layer) { |
| | | that.popupComp.setDatas(layer.feature) |
| | | that.popupComp.setShow() |
| | | return that.popupComp.$el |
| | | }, { |
| | | className: 's-map-popup', |
| | | minWidth: 300, |
| | | closeButton: false, |
| | | autoClose: false |
| | | }).addTo(featureGroup).bringToFront() |
| | | return featureGroup |
| | | } |