leaflet常用功能整理知識總結
最近一直在和leaflet打交道,就總結一下leaflet常用的功能和外掛供自己參考。
等我把手頭的專案完成,我會把我的程式碼整理好上傳供大家參考交流。
一、常用外掛
1.地圖底圖切換
https://github.com/htoooth/Leaflet.ChineseTmsProviders
2.切片地圖載入(wmts,支援向量切片)
https://github.com/mylen/leaflet.TileLayer.WMTS
3.wms地圖服務載入
https://github.com/heigeo/leaflet.wms
4.檢視範圍框定(只允許檢視和編輯給定範圍地圖)
5.地圖要素顯示比例尺控制(不同比例尺要素渲染,根據螢幕座標控制)
https://github.com/GreenInfo-Network/L.TileLayer.PixelFilter/
6.捲簾對比(卷積運算,歷史對比)
https://github.com/digidem/leaflet-side-by-side
7.webGL地圖要素渲染(使用三維要素繪製)
https://gitlab.com/IvanSanchez/Leaflet.TileLayer.GL
8.快速重新渲染地圖要素,動態修改地圖樣式(適用於向量切片,無需二次釋出服務)
(顏色獲取) https://github.com/frogcat/leaflet-tilelayer-colorpicker
(樣式調整)https://github.com/hnrchrdl/leaflet-tilelayer-colorizr
9.快速獲取要素範圍和屬性資訊(tootip方式)
https://github.com/consbio/Leaflet.UTFGrid
10.緩衝區(不推薦,存在bug,推薦使用geotools api後臺生成緩衝區,需要座標轉換)
https://github.com/TolonUK/Leaflet.EdgeBuffer
11.要素圖層組載入過程資料獲取(支援FeatureGroup,loading和load事件)
https://github.com/Outdooractive/Leaflet.FeatureGroup.LoadEvents
12.地圖要素移除,動態重新渲染底圖(動畫效果,緩衝效果)
https://gitlab.com/IvanSanchez/Leaflet.GridLayer.FadeOut
13.地圖向量切片服務載入和渲染
https://github.com/Leaflet/Leaflet.VectorGrid
(mapbox切片渲染)https://github.com/SpatialServer/Leaflet.MapboxVectorTile
(geojson格式渲染)https://github.com/mapbox/geojson-vt
14.常用格式地理資料載入(WKT,GeoJSON,KML,GPX,CSV,MDB,shp等)
https://github.com/mapbox/leaflet-omnivore
https://github.com/makinacorpus/Leaflet.FileLayer
https://github.com/calvinmetcalf/leaflet.shapefile
15. 地圖WFS服務操作,資料增刪改查(Insert,Update,Delete,Query,Transaction;WFS服務封裝,結合oracle或則postgis資料庫,arvgis server或者geoserver後臺服務搭建)
https://github.com/Flexberry/Leaflet-WFST
如果geoserver搭建服務端:
typeNS表示工作空間,typeName表示圖層名稱(表名一致)
16.自定義label標籤(Marker,polygon)
https://github.com/Leaflet/Leaflet.label
17.自定義marker
https://github.com/marslan390/BeautifyMarker
18.聚合資料
https://github.com/Leaflet/Leaflet.markercluster
https://github.com/MazeMap/Leaflet.LayerGroup.Collision
https://github.com/SINTEF-9012/PruneCluster
19.熱力圖
https://github.com/Leaflet/Leaflet.heat
http://ursudio.com/webgl-heatmap-leaflet/
20.載入echarts圖(聚合圖,遷徙圖,熱力圖)
https://github.com/wandergis/leaflet-echarts.git
21.要素編輯(面合併,分割,建立要素等;結合leaflet.wfst)
https://github.com/Leaflet/Leaflet.toolbar
https://github.com/Leaflet/Leaflet.draw
https://github.com/Leaflet/Leaflet.Editable
https://github.com/codeofsumit/leaflet.pm
https://github.com/willfarrell/Leaflet.Clipper
22.圖層切換,要素顯示隱藏
https://github.com/ismyrnow/leaflet-groupedlayercontrol
23.地圖導航條、全屏控制元件
https://github.com/turbo87/sidebar-v2/
https://github.com/kartena/Leaflet.Pancontrol
https://github.com/kartena/Leaflet.zoomslider
https://github.com/Leaflet/Leaflet.fullscreen
https://github.com/brunob/leaflet.fullscreen
24.鷹眼圖
https://github.com/Norkart/Leaflet-MiniMap
25.測量控制元件
https://github.com/ljagis/leaflet-measure
26.控制元件按鈕樣式設定
https://github.com/CliffCloud/Leaflet.EasyButton
https://github.com/aratcliffe/Leaflet.contextmenu
27.地圖列印外掛
https://github.com/rowanwins/leaflet-easyPrint
https://github.com/Igor-Vladyka/leaflet.browser.print
28.定位當前位置
https://github.com/domoritz/leaflet-locatecontrol
29.座標轉換外掛(與緩衝區,測量配合使用)
https://github.com/kartena/Proj4Leaflet
30.空間位置分析
(點是否在面內)https://github.com/kartena/Proj4Leaflet
(計算面積、距離)https://github.com/makinacorpus/Leaflet.GeometryUtil/blob/master/src/leaflet.geometryutil.js
31.路徑分析(糾偏,地圖匹配演算法)
https://github.com/perliedman/leaflet-routing-machine
https://github.com/Project-OSRM/osrm-frontend
32.poi模糊查詢
https://github.com/smeijer/leaflet-geosearch
https://github.com/perliedman/leaflet-control-geocoder
33.等勢線,等勢面
https://github.com/timwis/leaflet-choropleth
34.獲取滑鼠位置經緯度
https://github.com/ardhi/Leaflet.MousePosition
搬運源於https://blog.csdn.net/yangdengxian/article/details/79954827
其他leaflet知識總結:https://blog.csdn.net/itas109/article/details/70054588
基於Leaflet的GPS引數提取與軌跡重現實驗:https://blog.csdn.net/u011880112/article/details/79229947
圖片地圖功能:http://www.5iweb.com.cn/resource/5iweb2017042406/index.html
麻辣GIS教程:https://malagis.com/tag/Leaflet/