From 08b80bbc64775560795cd49be80ac9ce0a4817c8 Mon Sep 17 00:00:00 2001 From: Jean-Francois Doyon Date: Wed, 22 Mar 2006 00:13:14 +0000 Subject: [PATCH] Add docstrings, and add support for setting the map width and height after object creation. --- bindings/python/mapnik_layer.cpp | 4 ++-- bindings/python/mapnik_map.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bindings/python/mapnik_layer.cpp b/bindings/python/mapnik_layer.cpp index 804c9c191..bd011b547 100644 --- a/bindings/python/mapnik_layer.cpp +++ b/bindings/python/mapnik_layer.cpp @@ -105,9 +105,9 @@ void export_layer() ; class_("Layer","A map layer.",no_init) - .def("name",&Layer::name,return_value_policy()) + .def("name",&Layer::name,return_value_policy(), "Return the name of the layer.") .def("params",&Layer::params,return_value_policy()) - .def("envelope",&Layer::envelope) + .def("envelope",&Layer::envelope, "Return the geographic envelope/bounding box of the data in the layer.") .add_property("minzoom",&Layer::getMinZoom,&Layer::setMinZoom) .add_property("maxzoom",&Layer::getMaxZoom,&Layer::setMaxZoom) .add_property("styles",make_function diff --git a/bindings/python/mapnik_map.cpp b/bindings/python/mapnik_map.cpp index b45f36476..a174d4301 100644 --- a/bindings/python/mapnik_map.cpp +++ b/bindings/python/mapnik_map.cpp @@ -80,8 +80,8 @@ void export_map() .def(vector_indexing_suite >()) ; class_("Map",init >()) - .add_property("width",&Map::getWidth) - .add_property("height",&Map::getHeight) + .add_property("width",&Map::getWidth,&Map::setWidth) + .add_property("height",&Map::getHeight,&Map::setHeight) .add_property("srid",&Map::srid) .add_property("background",make_function (&Map::getBackground,return_value_policy()),