mapnik-org/mapnik — Issue #97: Ability to load mapnik xml from string
Author: artemp
Created: 2011-10-11 07:35:05+00:00
State: open
Labels: Boost_Python_Binding

It could be useful to be able to store a mapnik xml mapfile within a python script and (after potentially manipulating the xml in memory) then load the configuration.

There could be a mapnik.map_from_string() function or mapnik.load_map() could accept xml string so that you could say:

{{{
mapfile = '''

My Style

shape
../data/world_borders

'''

from mapnik import *
m = Map(600, 300)
load_map(m, mapfile)
[...]
}}}