| | |
| | | /** |
| | | * 加载业务数据图层 |
| | | * 加载wfs服务图层 |
| | | */ |
| | | import { STYLES } from '../../../conf/Constants' |
| | | import AjaxUtils from '../../../utils/AjaxUtils' |
| | |
| | | closeButton: false, |
| | | autoClose: false |
| | | }) |
| | | .bindTooltip((layer) => this.tooltipListener(layer), { direction: 'bottom', offset: [0, 15], sticky: true }) |
| | | layer.bindTooltip((layer) => this.tooltipListener(layer), { |
| | | direction: 'bottom', |
| | | offset: [0, 15], |
| | | sticky: true |
| | | }) |
| | | .on('mouseover', (e) => this.mouseOverListener(e, layer)).on('mouseout', (e) => this.mouseOutListener(e, layer)) |
| | | } |
| | | }).addTo(this.layer) |
| | |
| | | const icon = this.config.icon |
| | | const type = e.target.feature.geometry.type |
| | | if (type === 'LineString' || type === 'MultiLineString') { |
| | | layer.setStyle({ weight: 8, color: '#00ffff' }) |
| | | layer.setStyle({ |
| | | weight: 8, |
| | | color: '#00ffff' |
| | | }) |
| | | } else if (type === 'Point' || type === 'MultiPoint') { |
| | | layer.setStyle({ |
| | | img: { |
| | |
| | | const icon = this.config.icon |
| | | const type = e.target.feature.geometry.type |
| | | if (type === 'LineString' || type === 'MultiLineString') { |
| | | layer.setStyle({ weight: STYLES.WEIGHT, color: STYLES.COLOR }) |
| | | layer.setStyle({ |
| | | weight: STYLES.WEIGHT, |
| | | color: STYLES.COLOR |
| | | }) |
| | | } |
| | | if (type === 'Point' || type === 'MultiPoint') { |
| | | layer.setStyle({ |
| | |
| | | return name |
| | | } |
| | | } |
| | | |
| | | export default WfsLayerService |