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

Multiple Call to layer when Multiple styles in place #105

Open Mahendershah opened 6 years ago

Mahendershah commented 6 years ago

Hello ,

I am facing one issue when my Layer is having Multiple Styles in place, there is multiple database query that is getting fired. I have tried using true on the layer, but still this not helping me. When I have Layer with 2 styles there is 2 execute of query that is getting fired. Any help on this? I am using Mapnik 3.0.9 version.

Thanks Mahender Shah

talaj commented 6 years ago

Hi, you can set cache-features="true" on the Layer to prevent database query per each style. You have to keep in mind that it consumes some memory depending on how many and how big those features are. This is why the option is set to false by default.

Mahendershah commented 6 years ago

Yes I used that and it is working fine. Thanks..