mapnik / mapnik-support

Use the issues queue here to ask questions and offer help on using Mapnik (maybe if this works well we can retire the mailing list at http://mapnik.org/contact/?)
6 stars 6 forks source link

Combined marker symbolizer #147

Closed zdila closed 1 year ago

zdila commented 3 years ago

Is there a way to compose (by overlapping) markers which would use collision cache?

For example I want to render spring blue icon or red icon if it is a hot_spring, then add green dot if it is drinkable, red if it is not, add some shelter pictogram if it is refitted, use different base icon if it is mineral spring, etc.

Currently I created SVGs for some combinations of all the mentioned properties but adding another property (overlay) mutiplies amount of the icons.

Example: image

I can imagine it to be possible with https://github.com/mapycz/mapnik/blob/master/docs/features/keyed-collision-caches.md but unfortunately it is not merged to upstream.

@talaj sorry to mention you but I believe you have the answer ;-)

zdila commented 1 year ago

I've found that GroupSymbolizer could do the job. Unfortunately in my case it is missing some options I use in MarkersSymbolizer (see https://github.com/mapnik/mapnik/issues/4352).