react 使用 leaflet 百度地图_Leaflet-Develop-Guide ??

05f041f7b81d2f0ecc931c6c0f6a5f2c.png

Leaflet-Developer-Guide

文档

  • Leaflet 官方文档,Leaflet 插件集。
  • Leaflet 中文文档,中文插件集。火星科技翻译,文档所使用的Leaflet版本是 v1.0.3。
  • Leaflet 常用 API 结构图。
  • Leaflet 类之间继承关系图。

常用插件

绘制编辑插件

  • 矢量绘图 Leaflet Draw , API 参考文档,See the demo。
  • 几何图形编辑 Leaflet Editable, API 参考文档,See the demo。

地图服务资源加载插件

  • 基于leaflet加载ArcGIS服务插件 esri-leaflet。
  • 国内常用地图服务资源加载插件Leaflet.ChineseTmsProviders Provider for Chinese Tms Service,方便快捷的调用地图服务。支持的地图服务类型:TianDiTu、GaoDe、Google、Geoq、OSM。

优化 marker 相关的插件

  • 提供了丰富多彩的图标 Leaflet.awesome-markers, See the demo map。
  • 强大的集聚插件 Leaflet.markercluster, See the demo map。
  • 优化的label Leaflet.label, See the demo map。
  • 优化重叠在一起的markers OverlappingMarkerSpiderfier-Leaflet, See the demo map。
  • 优化在边框上显示不在当前视野中的marker Leaflet.EdgeMarker, See the demo map。

聚集类插件

  • 文本与图形聚集按图层优化插件 Leaflet.LayerGroup.Collision, See the demo map。

聚合插件

  • 轻量简单的热力图插件 Leaflet heat,See the demo。

地理空间分析

  • 一个可运行在浏览器和 Node.js中的高级地理空间分析库 Turf.js。

框架化

  • Vue 2 components for Leaflet maps Vue2Leaflet,使用文档,See the doc。
  • React components for Leaflet maps react-leaflet,使用文档,See the doc。
原文首发地址 https://github.com/liuvigongzuoshi/blog
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
使用react-router-dom创建动态路由非常简单。我们可以使用Route组件来定义路由并在其中使用动态参数。以下是如何使用react-router-dom创建动态路由的步骤: 1. 安装react-router-dom:使用以下命令安装react-router-dom。 ``` npm install react-router-dom ``` 2. 在项目中导入所需的组件: ```javascript import React from "react"; import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; ``` 3. 创建路由并在其中使用动态参数: ```javascript <Router> <Switch> <Route exact path="/" component={Home} /> <<Route exact path="/users/:id" component={User} /> </Switch> </Router> ``` 上面的代码中,我们定义了一个具有动态参数的路由。用户可以通过访问URL `/users/:id` 来访问该路由。其中,`:id` 是一个动态参数,它将被替换为用户请求的实际值。 4. 在组件中获取动态参数: 在上面的代码中,我们定义了一个名为`User`的组件。我们可以在该组件中通过`props.match.params.id`来获取动态参数的值。以下是一个简单的示例: ```javascript import React from "react"; const User = (props) => { return <h1>User ID: {props.match.params.id}</h1>; }; export default User; ``` 在上面的代码中,我们使用`props.match.params.id`来获取动态参数的值,并将其显示在页面上。 这就是使用react-router-dom创建动态路由的基本步骤。你可以根据你的具体需求进行调整和修改。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值