diff --git a/demo/test/charplacement.py b/demo/test/charplacement.py index 6f893033f9..b3a9f45553 100644 --- a/demo/test/charplacement.py +++ b/demo/test/charplacement.py @@ -42,7 +42,7 @@ road_style.rules.append(road_rule); #Road text -text_symbolizer = TextSymbolizer('NAME', 'DejaVu Sans Book', 20, Color('black')) +text_symbolizer = TextSymbolizer(Expression('[NAME]'), 'DejaVu Sans Book', 20, Color('black')) text_symbolizer.label_placement=label_placement.LINE_PLACEMENT text_symbolizer.minimum_distance = 0 #text_symbolizer.max_char_angle_delta = 40 @@ -77,6 +77,6 @@ render(m, im) # Save image to file -save_to_file('output.png', 'png',im) # true-colour RGBA +im.save('output.png') # true-colour RGBA print "Done\n" diff --git a/demo/test/displacement.py b/demo/test/displacement.py index 5e2282611a..185a5f8b0c 100644 --- a/demo/test/displacement.py +++ b/demo/test/displacement.py @@ -43,7 +43,7 @@ road_style.rules.append(road_rule); #Road text -text_symbolizer = TextSymbolizer('NAME', 'DejaVu Sans Book', 10, Color('black')) +text_symbolizer = TextSymbolizer(Expression('[NAME]'), 'DejaVu Sans Book', 10, Color('black')) text_symbolizer.label_placement=label_placement.LINE_PLACEMENT text_symbolizer.minimum_distance = 0 #text_symbolizer.max_char_angle_delta = 40 @@ -78,6 +78,6 @@ render(m, im) # Save image to file -save_to_file('output.png', 'png',im) # true-colour RGBA +im.save('output.png') # true-colour RGBA print "Done\n" diff --git a/demo/test/overlap.py b/demo/test/overlap.py index a1d28a9fdc..291159eb73 100644 --- a/demo/test/overlap.py +++ b/demo/test/overlap.py @@ -44,7 +44,7 @@ road_style.rules.append(road_rule); #Road text -text_symbolizer = TextSymbolizer('NAME', 'DejaVu Sans Book', 10, Color('black')) +text_symbolizer = TextSymbolizer(Expression('[NAME]'), 'DejaVu Sans Book', 10, Color('black')) text_symbolizer.label_placement=label_placement.LINE_PLACEMENT text_symbolizer.minimum_distance = 0 #text_symbolizer.max_char_angle_delta = 40 @@ -79,6 +79,6 @@ render(m, im) # Save image to file -save_to_file('output.png', 'png',im) # true-colour RGBA +im.save('output.png') # true-colour RGBA print "Done\n" diff --git a/demo/test/textspacing.py b/demo/test/textspacing.py index 482ee4066b..0d01e149f0 100644 --- a/demo/test/textspacing.py +++ b/demo/test/textspacing.py @@ -43,7 +43,7 @@ road_style.rules.append(road_rule); #Road text -text_symbolizer = TextSymbolizer('NAME', 'DejaVu Sans Book', 10, Color('black')) +text_symbolizer = TextSymbolizer(Expression('[NAME]'), 'DejaVu Sans Book', 10, Color('black')) text_symbolizer.label_placement=label_placement.LINE_PLACEMENT text_symbolizer.minimum_distance = 0 #text_symbolizer.max_char_angle_delta = 40 @@ -77,6 +77,6 @@ render(m, im) # Save image to file -save_to_file('output.png', 'png',im) # true-colour RGBA +im.save('output.png') # true-colour RGBA print "Done\n"