How to calculate the distance of a polyline in Leaflet like geojson.io?

后端 未结 4 1712
日久生厌
日久生厌 2021-02-15 03:04

I am working on a map with Mapbox and Leaflet and I am supposed to let the user draw polygons and calculate and show the are of that polygon and I also need to let the user draw

4条回答
  •  北海茫月
    2021-02-15 03:44

    I would also encourage readers to check out the turf library. It works great with leaflet and has many useful methods including polyline distance. http://turfjs.org/docs

提交回复
热议问题