provide fix for #807 in upgrading map xml script
This commit is contained in:
parent
cd8baba3be
commit
19ee3ae8af
1 changed files with 6 additions and 1 deletions
|
@ -70,6 +70,11 @@ def handle_attr_changes(sym):
|
|||
if sym.attrib.get('text_transform'):
|
||||
sym.attrib.pop('text_transform')
|
||||
|
||||
# http://trac.mapnik.org/ticket/807
|
||||
justify_alignment = sym.attrib.get('justify_alignment',sym.attrib.get('justify-alignment'))
|
||||
if justify_alignment and justify_alignment == "middle":
|
||||
sym.attrib['justify-alignment'] = 'center'
|
||||
|
||||
minimum_distance = sym.attrib.get('min_distance')
|
||||
if minimum_distance:
|
||||
sym.attrib['minimum-distance'] = minimum_distance
|
||||
|
@ -259,7 +264,7 @@ if __name__ == "__main__":
|
|||
upgrade(input_xml,output_xml=output_xml,indent_xml=options.indent_xml)
|
||||
|
||||
elif len(args) == 1:
|
||||
print 'Upgrading "%s" to "%s"...' % (input_xml,output_xml)
|
||||
print 'Upgrading "%s"...' % (input_xml)
|
||||
upgrade(input_xml,output_xml=output_xml,indent_xml=options.indent_xml)
|
||||
|
||||
elif len(args) > 1: # assume a list of inputs
|
||||
|
|
Loading…
Add table
Reference in a new issue