html - 使用 Leaflet Search 插件搜索 Shapefile
问题描述
我有一张在 CodeSandbox 中构建的地图,可以加载并显示一些 shapefile。我想在此地图中添加一个搜索栏,以便可以搜索 shapefile 的名称。据我所知,我最好的选择是使用 Leaflet 搜索插件 ( https://github.com/stefanocudini/leaflet-search ) 来实现与以下内容相同的效果:https ://labs.easyblog.it/maps /leaflet-search/examples/geojson-layer.html。
我不确定如何将插件代码准确地实现到我的地图以使 TestShapefile 可搜索。特别是,我不确定如何从 github 网站加载 .css 和 .js 文件,以及这个插件是否真的可以使用 shapefile 而不是 GeoJSON。任何帮助将这些放在一起将不胜感激。
解决方案
推荐阅读
- c# - 如何将引号(“)放在字符串c#中
- sql-server - 在 db.table 中插入不同的条目会导致 SQL Server 中的隐式转换错误
- r - 我可以在 metafor 的 Forest Plot 中更改从 ilab=cbind 加载的文本的颜色吗?
- nestjs - 使用 joi 进行自定义配置模块验证
- c++ - 定时器是从另一个线程启动的吗?
- c++ - C++ 2D 数组索引比较
- vulkan - 归一化、缩放和整数 VkFormats 有什么区别?
- android - 自定义对话框扩展对话框不通过 onCreate 呈现布局被执行
- c - futex 手册页演示结果不正确
- javascript - Vue-router嵌套路由未加载我的组件页面