In a map in a web application, I would like to illustrate distance along a path, like how it is done with the measure distance tool in Google Maps (see attached image).

Is there a way to do this in Mapbox GL JS?

Screenshot from Google Maps showing a polyline path with distance tick marks at regular intervals.

  • 1
    GIS SE is a site for focused Q&A, so you have to decide what framework you want to use/ask about: Mapbox GL JS, Leaflet or Google Maps, otherwise question is most likely to be closed as not compliant with the site policy.
    – TomazicM
    Jun 16, 2022 at 10:37
  • Thanks for the warning. This really is an open question, so maybe it isn't suitable for this site. However, I split it into multiple more focused questions. Jun 17, 2022 at 8:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.