mobile-sdk icon indicating copy to clipboard operation
mobile-sdk copied to clipboard

vector layer can use cartocss style?

Open ryfx opened this issue 7 years ago • 6 comments

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

ryfx avatar Aug 01 '17 06:08 ryfx

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

jaakla avatar Aug 01 '17 07:08 jaakla

@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.

ryfx avatar Aug 02 '17 01:08 ryfx

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

  • Dotted / dashed lines (ideally we should be able to do anything we can do with the stroke-dasharray CSS property)
  • A border for Point geometries, which would allow us to create circles with a black border and transparent fill for example.
  • Less critical for us, but still nice : options to define a base shape for a point. Maybe something like SLD styling allows you to do with points : you can specify shape type among circle, square, triangle, star, cross, or x. Among with the point border option, they would provide a good number of ways to represent different kind of things without having to use more complex geometries like Polygons or Marks.

Shtong avatar Aug 24 '17 16:08 Shtong

@mtehver can comment?

jaakla avatar Aug 25 '17 11:08 jaakla

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.

mtehver avatar Aug 25 '17 12:08 mtehver

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.

Shtong avatar Aug 25 '17 13:08 Shtong