From 9203639640668ca797bb99dfcdca9e23a6713d46 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 5 Dec 2011 18:05:35 -0800 Subject: [PATCH] fully spell out parameters on the map object - refs #977 --- bindings/python/mapnik_map.cpp | 2 +- tests/python_tests/extra_map_props_test.py | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bindings/python/mapnik_map.cpp b/bindings/python/mapnik_map.cpp index db332ecda..a51b26e9f 100644 --- a/bindings/python/mapnik_map.cpp +++ b/bindings/python/mapnik_map.cpp @@ -453,7 +453,7 @@ void export_map() ) .add_property("extra_attributes",make_function(attr_nonconst,return_value_policy()),"TODO") - .add_property("params",make_function(params_nonconst,return_value_policy()),"TODO") + .add_property("parameters",make_function(params_nonconst,return_value_policy()),"TODO") .add_property("aspect_fix_mode", &Map::get_aspect_fix_mode, diff --git a/tests/python_tests/extra_map_props_test.py b/tests/python_tests/extra_map_props_test.py index 47f61c8d4..9fa386673 100644 --- a/tests/python_tests/extra_map_props_test.py +++ b/tests/python_tests/extra_map_props_test.py @@ -28,24 +28,24 @@ def test_arbitrary_parameters_attached_to_map(): attr = m.extra_attributes eq_(len(attr),0) - eq_(len(m.params),6) - eq_(m.params['key'],'value2') - eq_(m.params['key3'],'value3') - eq_(m.params['unicode'],u'iván') - eq_(m.params['integer'],10) - eq_(m.params['decimal'],.999) - eq_(m.params['number-as-string'],u'.9998') + eq_(len(m.parameters),6) + eq_(m.parameters['key'],'value2') + eq_(m.parameters['key3'],'value3') + eq_(m.parameters['unicode'],u'iván') + eq_(m.parameters['integer'],10) + eq_(m.parameters['decimal'],.999) + eq_(m.parameters['number-as-string'],u'.9998') def test_serializing_arbitrary_parameters(): m = mapnik.Map(256,256) - m.params.append(mapnik.Parameter('width',m.width)) - m.params.append(mapnik.Parameter('height',m.height)) + m.parameters.append(mapnik.Parameter('width',m.width)) + m.parameters.append(mapnik.Parameter('height',m.height)) m2 = mapnik.Map(1,1) mapnik.load_map_from_string(m2,mapnik.save_map_to_string(m)) - eq_(m2.params['width'],m.width) - eq_(m2.params['height'],m.height) + eq_(m2.parameters['width'],m.width) + eq_(m2.parameters['height'],m.height) if __name__ == "__main__": setup()