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 loadMap from xml works? #102

Closed am2222 closed 6 years ago

am2222 commented 6 years ago

Hi, I have an xml file which only includes a set of styles, If I add some styles using c++ api and then I load xml file does it overwrite previously added styles? and also can I add layers again using api functions and use the styles which are loaded from xml? thanks

talaj commented 6 years ago

If I add some styles using c++ api and then I load xml file does it overwrite previously added styles?

No, it will add them as new styles and it will throw an error in case of style name collision.

and also can I add layers again using api functions and use the styles which are loaded from xml?

Yes, this is possible. You can load an XML style without layer definitions and add them later by the Mapnik C++ API.

am2222 commented 6 years ago

@talaj thanks for your answer, So in fact each time we load a new style.xml we just add those styles to the old ones . it does not clear previous styles, right?

talaj commented 6 years ago

Yes, it does not clear previous styles.

am2222 commented 6 years ago

@talaj thanks very much for your answer