Line layer (polyline helper)

Learn how to incorporate a line layer into your map by utilizing the polyline layer helper. This example shows how to add a line layer to the map using the polyline layer helper with the default values. To replicate this example, download the Amphitheater Lake trail sample data.

In this instance, the color is randomly selected from a predefined list of colors. This is the default action when no specific color is specified.



Related examples

An extension of MapLibre GL JS