| | |
| | | minWidth: 300, |
| | | closeButton: false, |
| | | autoClose: false |
| | | }).bindTooltip(function (layer) { |
| | | console.log(layer) |
| | | return layer.feature.properties.name |
| | | }).on('mouseover', function (e) { |
| | | console.log(e) |
| | | var layer = e.layer |
| | | layer.setStyle({ weight: 5 }) |
| | | layer.setStyle({ weight: 8, color: '#00ffff' }) |
| | | }).on('mouseout', function (e) { |
| | | var layer = e.layer |
| | | layer.setStyle({ weight: styles.defaultLineStyle.weight }) |
| | | }).addTo(featureGroup) |
| | | layer.setStyle({ weight: styles.defaultLineStyle.weight, color: styles.defaultLineStyle.color }) |
| | | }).addTo(featureGroup).tooltip() |
| | | if (Object.prototype.hasOwnProperty.call(res, 'features') && res.features.length > 0 && (res.features[0].geometry.type === 'LineString' || res.features[0].geometry.type === 'MultiLineString')) { |
| | | geojson.bringToBack() |
| | | } else { |
| | |
| | | const defaultLineStyle = { |
| | | fill: true, |
| | | weight: 2, |
| | | weight: 3, |
| | | fillColor: '#73b2ff', |
| | | color: '#73b2ff', |
| | | fillOpacity: 0.2, |