So I draw a bunch of traffic information on the map, like so:
// 'line-cap': 'round',
// 'line-join': 'round',
And it works, I see the traffic information drawn. But I was trying to style the layer a bit more. And since - in my understanding - the v5-version of the SDK is based on the Mapbox GL JS library, I was browsing through their documentation to see what options I had (since it’s not described in the v5-documentation, right?)
So I checked here: https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers-line and tried to apply the line-cap property. But then I’ll get a runtime error that the line-cap isn’t an allowed option.
Could someone please tell me what options are available or (even better) where it’s documented?
We are investigating this.
When it comes to the documentation - we are working on putting it on the portal.
Ok. I figured the TomTom Web SDK was based on one of the latest Mapbox versions.
So I wonder what caused this.
Maybe this might help. When I uncomment the lines above, so I have:
it will result in:
Error: layers.10551905.paint.line-cap: unknown property "line-cap"
at Object.un [as emitValidationErrors] (bundle.js:14)
at Te (bundle.js:14)
at r._validate (bundle.js:14)
at r.addLayer (bundle.js:14)
at A.addLayer (bundle.js:14)
at t.<computed> [as addLayer] (bundle.js:14)
at Array.forEach (<anonymous>)
at drawRoads (bundle.js:2236)
line-cap is a property of layout, not paint.
Awesome! Thanks, it works
For anyone else who is struggling with this, I just noticed that below each property is displayed where it’s a property of. For instance: