+ expose map resize and remove_all methods as well as view_transform property in python
This commit is contained in:
parent
fd194e2ba6
commit
f0d58a99f3
2 changed files with 27 additions and 2 deletions
|
@ -11,7 +11,9 @@ Developers: Please commit along with changes.
|
|||
For a complete change history, see the SVN log.
|
||||
|
||||
|
||||
Current Version (0.5.2-dev, SVN trunk):
|
||||
Current Version (0.6.0-dev, SVN trunk):
|
||||
---------------------------------------
|
||||
|
||||
- python/mapnik_map.cpp: Added ability to resize map and clear all layers and styles from python (r792)
|
||||
|
||||
- load_map.cpp and save_map.cpp: Added xml serialization for abstract, title, minzoom, maxzoom, and queryable attributes (r787)
|
|
@ -132,7 +132,7 @@ void export_map()
|
|||
">>> m.append_style('Style Name', sty)\n"
|
||||
"False # you can only append styles with unique names\n"
|
||||
)
|
||||
|
||||
|
||||
.def("envelope",
|
||||
make_function(&Map::getCurrentExtent,
|
||||
return_value_policy<copy_const_reference>()),
|
||||
|
@ -218,6 +218,13 @@ void export_map()
|
|||
">>> feat.next()\n"
|
||||
">>> <mapnik._mapnik.Feature object at 0x5fe1b0>\n"
|
||||
)
|
||||
|
||||
.def("remove_all",&Map::remove_all,
|
||||
"Remove all Mapnik Styles and Layers from the Map.\n"
|
||||
"\n"
|
||||
"Usage:\n"
|
||||
">>> m.remove_all()\n"
|
||||
)
|
||||
|
||||
.def("remove_style",&Map::remove_style,
|
||||
"Remove a Mapnik Style from the map.\n"
|
||||
|
@ -225,6 +232,13 @@ void export_map()
|
|||
"Usage:\n"
|
||||
">>> m.remove_style('Style Name')\n"
|
||||
)
|
||||
|
||||
.def("resize",&Map::resize,
|
||||
"Resize a Mapnik Map.\n"
|
||||
"\n"
|
||||
"Usage:\n"
|
||||
">>> m.resize(64,64)\n"
|
||||
)
|
||||
|
||||
.def("scale", &Map::scale,
|
||||
"Return the Map Scale.\n"
|
||||
|
@ -279,6 +293,15 @@ void export_map()
|
|||
"2\n"
|
||||
)
|
||||
|
||||
|
||||
.add_property("view_transform",make_function(&Map::getCurrentExtent,
|
||||
return_value_policy<copy_const_reference>()),
|
||||
"View the Map CoordinateTransform Envelope.\n"
|
||||
"\n"
|
||||
"Usage:\n"
|
||||
">>> m.view_transform\n"
|
||||
)
|
||||
|
||||
.add_property("height",
|
||||
&Map::getHeight,
|
||||
&Map::setHeight,
|
||||
|
|
Loading…
Reference in a new issue