Reputation: 69
I add a line layer in MapBoxGl with a property named line-dasharray, now I want to remove the effect of line-dasharray by map.setPaintProperty(layerId,'line-dasharray',[1,0])
,but It still have little dash , what should I do ? And I don't want to make it by remove the layer and add it without line-dasharray
.
Upvotes: 0
Views: 1104
Reputation: 4281
As suggested in the comments above, the correct way to "reset" the line-dasharray
property is this:
map.setPaintProperty(layerId, 'line-dasharray', null)
You can also use undefined
instead of null
, though an empty string will result in an error.
Upvotes: 3