Within mapbox tilemill it is possible to make make rail-roads like this: mapbox railroad example
(source: mapbox.com)

To achieve this you need to write the following code: Source

#railroads {
  ::line, ::hatch { line-color: #777; }
  ::line { line-width:1; }
  ::hatch {
    line-width: 4;
    line-dasharray: 1, 24;

Would it also be possible to achieve the same within leaflet?


The following library would allow you to achieve this on a leaflet polyline using text elements: https://github.com/makinacorpus/Leaflet.TextPath

A working example can be found here: http://makinacorpus.github.io/Leaflet.TextPath/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.