CartoDB / mobile-carto-libs

Internal dependencies for CARTO Mobile SDK
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

[feature-request] dash array support with linear,step .... #15

Open farfromrefug opened 2 years ago

farfromrefug commented 2 years ago

Right now it is impossible to use linear/step/... with dash-array because those functions expect a constant and not an array. Would it be possible to have it work ?

mtehver commented 2 years ago

No support for this currently. linear with dash-array does not make much sense to me. step perhaps could work with it, but currently only numbers and colors are supported as values. You can of course use ? : operator which is a bit cumbersome, but works:

line-dasharray: ([zoom] < 5 ? (5, 2) : ([zoom] < 8 ? (6, 3) : (8, 4)));
farfromrefug commented 2 years ago

@mtehver i do understand it is not straightforward .And indeed mapbox studio only accepts steps for dash array. Is it already working with step? (dont think so)