Reputation: 68740
I'm using the official Carto library to parse CartoCSS:
cartocss = "#views { line-color: #7B00B4; line-width: 1; line-opacity: 0.7; line-dasharray: 4,2; }";
shader = new carto.RendererJS().render(cartocss),
style = shader.layers[0].getStyle({ property: 1 }, { zoom: 10 });
console.log({shader, style});
Here's a fiddle: http://jsfiddle.net/mz5xj67p/2/
The issue is the the value of dasharray
. Although the style object has the correct value (4, 2
) but when I try to retrieve it using getStyle
method it just returns 4
.
What am i missing?
Upvotes: 0
Views: 55