Add docstrings, and add support for setting the
map width and height after object creation.
This commit is contained in:
parent
30dd43200b
commit
08b80bbc64
2 changed files with 4 additions and 4 deletions
|
@ -105,9 +105,9 @@ void export_layer()
|
|||
;
|
||||
|
||||
class_<Layer>("Layer","A map layer.",no_init)
|
||||
.def("name",&Layer::name,return_value_policy<copy_const_reference>())
|
||||
.def("name",&Layer::name,return_value_policy<copy_const_reference>(), "Return the name of the layer.")
|
||||
.def("params",&Layer::params,return_value_policy<reference_existing_object>())
|
||||
.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
|
||||
|
|
|
@ -80,8 +80,8 @@ void export_map()
|
|||
.def(vector_indexing_suite<std::vector<Layer> >())
|
||||
;
|
||||
class_<Map>("Map",init<int,int,boost::python::optional<int> >())
|
||||
.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<copy_const_reference>()),
|
||||
|
|
Loading…
Reference in a new issue