I am modifying an XML file dynamically in python as a string, and I load the file with mapnik.load_map_from_string(...). Then, I would like to change the datasource.

    mapnik.load_map_from_string(m,mapfile)
    for l in m.layers:
        l.datasource = Osm(file='element2.osm')
    save_map(m,'mapfile.xml')

The mapfile.xml take into account my new datasource 'element2.osm', but mapnik.render(m, im) will render with my previous datasource (which is called 'element.osm'.
The datasource is changed, but not taken into account. Any idea?

Yves
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to