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

How to prevent rendering label on lower layer if there will be label on higher one? #122

Closed zdila closed 5 years ago

zdila commented 5 years ago

I would like to prevent rendering label on lower (L) layer if there will be label on higher one (H). I can't change order of the layers because there is another layer which should be above (L) and below (H).

talaj commented 5 years ago

With current Mapnik you can only render labels from (H) before (L) with opacity="0", then clear collision detector cache before (H) by clear-label-cache="true" to allow to render them again with original opacity. But to clean all the collision cache is probably not desired. It would need something like Keyed collision caches.

zdila commented 5 years ago

Thanks for the answer.