mapbox-gl-js
mapbox-gl-js copied to clipboard
line-trim-offset without lineMetrics available makes line disappear
line-trim-offset works only if lineMetrics is set for geojson sources. When it isn't set, the line disappears completely. It shouldn't disappear and a warning should be logged.
mapbox-gl-js version: v2.9.1
browser: all
Steps to Trigger Behavior
- open debug/debug.html
- map.setPaintProperty('route', 'line-trim-offset', [0, 0.5])
Link to Demonstration
http://localhost:9966/debug/debug.html#12.5/38.88894/-77.01842
Expected Behavior
The route line is still rendered without clipping. A warning is logged once explaining that lineMetrics needs to be set for the property to work correctly.
Actual Behavior
Line disappears.