CartoDB / mobile-sdk

CARTO Mobile SDK core project
https://carto.com/docs/carto-engine/mobile-sdk/
BSD 3-Clause "New" or "Revised" License
181 stars 65 forks source link

vector layer can use cartocss style? #121

Open ryfx opened 7 years ago

ryfx commented 7 years ago

vector tile layer can use the cartocss style,but the vector layer's style is too simple.

jaakla commented 7 years ago

Yes, vector layer style has less options. Can you detail your needs: what exactly do you miss from there?

ryfx commented 7 years ago

@jaakla for example vector layer can render as mapnik map or mapsforge,it can also use cartocss or any other styleset to rule the map layer.

Shtong commented 7 years ago

A few missing options that we would be happy to have are :

jaakla commented 7 years ago

@mtehver can comment?

mtehver commented 7 years ago

I think all this can be achieved with current styling options. For dashed line, you need to generate the dashed pattern bitmap and use the LineStyleBuilder.setBitmap method. Not sure how well it works, we have not tried this for a while and the patterning may not work as well as with vector tiles.

Regarding points/markers - simply use canvas to generate the bitmaps you need and use these.

We are thinking about adding SVG support to Bitmap loader, so this may be also helpful. Not sure we will add this into 4.1.0, though.

Shtong commented 7 years ago

Of course, using dynamically generated bitmaps is the way I was planning to go for these features. But it's always nice when I can use an API to avoid spending time on that kind of common task :) . So since you asked for feedback, I jumped on the occasion.