This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to highlight a route from city A to city B on the Tile Layer in JavaScript?

0

I'm defining map with a Tile Layer like this:

L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
          attribution: "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
          subdomains: ["a", "b", "c"]
        }).addTo(map);

How can I use tags, like "from", "to", "route" and others, and where to put them to get something like this? Thank you!

asked 30 Apr '18, 13:36

RevoltEnergy's gravatar image

RevoltEnergy
11112
accept rate: 0%

Source code available on GitHub .