Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 2
    I had to explicitly set className of the divIcon options to '' to prevent the whitesquares from showing.
    – Timo
    Commented Dec 21, 2017 at 20:35
  • Hi, how do you add the connection line between the markers? Commented Mar 31, 2020 at 6:35
  • 1
    Hi @SittiMunirahAbdulRazak from memory I used a GeoJSON feature collection, because we were using an OSRM server to generate the routes. The react-leaflet library has a Geojson component you can pass this data directly to, you can do the same with Leaflet too without React, here's a plugin they promote on their site liedman.net/leaflet-routing-machine
    – tutts
    Commented Mar 31, 2020 at 12:15