相关疑难解决方法(0)

如何在反应传单中使用 polylinedac​​orator

我已经使用 react-leaflet 创建了折线,我想使用 polylinedac​​orator 在折线上显示方向。但我不知道如何使用 react-leaflet 做到这一点。我找到了多个带有传单的示例,但没有使用 react-leaflet

const polyline = [[51.505, -0.09], [51.51, -0.1], [51.51, -0.12]]

export default class VectorLayersExample extends Component<{}> {
  render() {
    return (
      <Map center={center} zoom={13}>
       <TileLayer
          attribution='&amp;copy <a 
            href="http://osm.org/copyright">OpenStreetMap</a> 
            contributors'
          url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
      />
    <Polyline color="lime" positions={polyline} />
    </Map>
 )
 }
Run Code Online (Sandbox Code Playgroud)

任何人都可以告诉我如何使用带有上述代码的 polylinedac​​orators

leaflet reactjs react-leaflet

1
推荐指数
1
解决办法
1130
查看次数

标签 统计

leaflet ×1

react-leaflet ×1

reactjs ×1