title: How to make a custom line layer in Mapbox-gl?
body: <p><a href="https://i.stack.imgur.com/LKzf3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LKzf3.png" alt="enter image description here"></a></p>
  
  <p>Is it possible to make a custom line layer that could have some kind of direction markers (for example arrows)? How could I achieve something like this for provided geojson route?</p>
  
  <p>Right now I'm just using this to make a simple route line for an imported gpx file:</p>
  
  <pre><code>map.addLayer({
        "id": "route",
        "type": "line",
        "source": {
            "type": "geojson",
            "data": path,
            "lineMetrics": true
        },
        "layout": {
            "line-join": "round",
            "line-cap": "round"
        },
        "paint": {
          //'line-color': 'red',
          'line-width': 8,
        },
    });
  </code></pre>