From 3e4d579a5e18d6ad4cb9e1f3d656165baa5936e2 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 20 Aug 2012 18:18:36 -0700 Subject: [PATCH] +reflect background_image in python and add background_color to match XML --- CHANGELOG.md | 2 ++ bindings/python/mapnik_map.cpp | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89d6952f0..008095c1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,8 @@ TODO - fill these out more: - geometry closed - feature api better - context's provide schema support +- Python: exposed Map `background_image` (and aliased `background` to `background_color`) + - Python: exposed BuildingSymbolizer - Support in the CSV plugin for reading JSON encoded geometries (#1392) diff --git a/bindings/python/mapnik_map.cpp b/bindings/python/mapnik_map.cpp index f7af30291..ab0b0fd5c 100644 --- a/bindings/python/mapnik_map.cpp +++ b/bindings/python/mapnik_map.cpp @@ -370,12 +370,30 @@ void export_map() .add_property("background",make_function (&Map::background,return_value_policy()), &Map::set_background, - "The background color of the map.\n" + "The background color of the map (same as background_color property).\n" "\n" "Usage:\n" ">>> m.background = Color('steelblue')\n" ) + .add_property("background_color",make_function + (&Map::background,return_value_policy()), + &Map::set_background, + "The background color of the map.\n" + "\n" + "Usage:\n" + ">>> m.background_color = Color('steelblue')\n" + ) + + .add_property("background_image",make_function + (&Map::background_image,return_value_policy()), + &Map::set_background_image, + "The optional background image of the map.\n" + "\n" + "Usage:\n" + ">>> m.background_image = '/path/to/image.png'\n" + ) + .add_property("base", make_function(&Map::base_path,return_value_policy()), &Map::set_base_path,