| | |
| | | console.log(feature) |
| | | console.log(layer) |
| | | featureList.push(layer) |
| | | layer.addTo(featureGroup) |
| | | } |
| | | }).bindPopup(function (layer) { |
| | | layer.bindPopup(function (layer) { |
| | | that.popupComp.setDatas(layer) |
| | | that.popupComp.setShow() |
| | | return that.popupComp.$el |
| | |
| | | return name |
| | | }, { direction: 'bottom', offset: [0, 15], sticky: true }) |
| | | .on('mouseover', function (e) { |
| | | const layer = e.layer |
| | | const type = e.layer.feature.geometry.type |
| | | const type = e.target.feature.geometry.type |
| | | if (type === 'LineString' || type === 'MultiLineString') { |
| | | layer.setStyle({ weight: 8, color: '#00ffff' }) |
| | | } else if (type === 'Point' || type === 'MultiPoint') { |
| | |
| | | layer.bringToFront() |
| | | } |
| | | }).on('mouseout', function (e) { |
| | | const layer = e.layer |
| | | const type = e.layer.feature.geometry.type |
| | | const type = e.target.feature.geometry.type |
| | | if (type === 'LineString' || type === 'MultiLineString') { |
| | | layer.setStyle({ weight: styles.defaultLineStyle.weight, color: styles.defaultLineStyle.color }) |
| | | } |
| | |
| | | } |
| | | }) |
| | | } |
| | | // }).addTo(that.map) |
| | | // }).addTo(featureGroup) |
| | | }).addTo(featureGroup) |
| | | } |
| | | }) |
| | | store.commit('addSewersDatas', geojson) |
| | | featureGroup.addTo(that.map) |