Class that allows for drawing of data from database. More...
#include <DisplayDB.h>
Public Member Functions | |
DisplayDB (OsmDatabase &db, std::string const &path_base, int min_zoom, int max_zoom) | |
Constructs a DisplayDB. | |
virtual | ~DisplayDB () |
std::vector< std::unique_ptr < display::DisplayElement > > const & | get_display_elements () |
OsmDatabase & | get_db () |
void | set_bounds (geo::Point const &topleft, geo::Point const &bottomright, int zoom) |
Change current view to position bounded by topleft and bottomright using zoomlevel zoom. | |
std::vector< std::unique_ptr < osm::Element > > | get_selected (geo::Point const &topleft, geo::Point const &bottomright, int zoom) |
Retrieve osm::Elements in box specified by topleft and bottomright when current zoom level is zoom. | |
double | center_lat () |
double | center_lon () |
Class that allows for drawing of data from database.
Uses xml files to specify what to draw.
Definition at line 23 of file DisplayDB.h.
osmdb::DisplayDB::DisplayDB | ( | OsmDatabase & | db, |
std::string const & | path_base, | ||
int | min_zoom, | ||
int | max_zoom | ||
) |
Constructs a DisplayDB.
db | underlying OsmDatabase |
path_base | path to xml files specifying what to draw, this should be a directory containing files <min_zoom>.xml to <max_zoom>.xml |
min_zoom | minimum zoom level to draw |
max_zoom | maximum zoom level to draw |
Definition at line 15 of file DisplayDB.cpp.
osmdb::DisplayDB::~DisplayDB | ( | ) | [virtual] |
Definition at line 36 of file DisplayDB.cpp.
double osmdb::DisplayDB::center_lat | ( | ) | [virtual] |
Implements display::DisplayProvider.
Definition at line 92 of file DisplayDB.cpp.
double osmdb::DisplayDB::center_lon | ( | ) | [virtual] |
Implements display::DisplayProvider.
Definition at line 97 of file DisplayDB.cpp.
OsmDatabase & osmdb::DisplayDB::get_db | ( | ) |
Definition at line 40 of file DisplayDB.cpp.
std::vector< std::unique_ptr< display::DisplayElement > > const & osmdb::DisplayDB::get_display_elements | ( | ) | [virtual] |
Implements display::DisplayProvider.
Definition at line 45 of file DisplayDB.cpp.
std::vector< std::unique_ptr< osm::Element > > osmdb::DisplayDB::get_selected | ( | geo::Point const & | topleft, |
geo::Point const & | bottomright, | ||
int | zoom | ||
) | [virtual] |
Retrieve osm::Elements in box specified by topleft and bottomright when current zoom level is zoom.
topleft | |
bottomright | |
zoom |
Implements display::DisplayProvider.
Definition at line 65 of file DisplayDB.cpp.
void osmdb::DisplayDB::set_bounds | ( | geo::Point const & | topleft, |
geo::Point const & | bottomright, | ||
int | zoom | ||
) | [virtual] |
Change current view to position bounded by topleft and bottomright using zoomlevel zoom.
topleft | |
bottomright | |
zoom |
Implements display::DisplayProvider.
Definition at line 50 of file DisplayDB.cpp.