Skip to content

Lines

Example usage of the LineLayer with two different stroke_width_unit_mode values.

Both layers draw the same set of parallel lines in data coordinates. The layer on the left (blue) uses stroke_width_unit_mode: "Data", so its line width is expressed in data-coordinate units and scales with the camera as you zoom. The layer on the right (orange) uses stroke_width_unit_mode: "Pixels", so its line width stays constant on screen regardless of zoom level.