From b7a0204bf21c047edd611ec0864b7b06d20df431 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 25 May 2011 23:51:08 +0000 Subject: [PATCH] add tests for map 'base' parameter --- CHANGELOG | 6 ++++++ tests/python_tests/object_test.py | 21 ++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3014800cb..2502b996b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,12 @@ For a complete change history, see the SVN log. Mapnik Trunk ------------ +- Added map.base parameter that can be set to control where files with relative paths should be interpreted + from when a map is loaded from a string or saved to a string. It defaults to an empty string which means + that the base path will be the current working directory of the mapnik process. When a stylesheet is read + from a file that files directory is used. And a custom value can still be passed as an argument to + load_map_from_string(). + - Added python function 'render_grid' to allow conversion of grid buffer to python object containing list of grid pixels, list of keys, and a and dictionary of feature attributes. diff --git a/tests/python_tests/object_test.py b/tests/python_tests/object_test.py index 78849b889..e3f148f19 100644 --- a/tests/python_tests/object_test.py +++ b/tests/python_tests/object_test.py @@ -344,16 +344,14 @@ def test_map_init(): eq_(m.width, 256) eq_(m.height, 256) eq_(m.srs, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs') + eq_(m.base, '') m = mapnik2.Map(256, 256, '+proj=latlong') - - eq_(m.width, 256) - eq_(m.height, 256) eq_(m.srs, '+proj=latlong') # Map initialization from string def test_map_init_from_string(): - map_string = ''' + map_string = '''