libosmscout
0.1
|
Service,to get a structured description of an object on the map (Area, Way or Node). More...
#include <DescriptionService.h>
Public Member Functions | |
DescriptionService () | |
ObjectDescription | GetDescription (const Area &area) const |
ObjectDescription | GetDescription (const FeatureValueBuffer &buffer) const |
ObjectDescription | GetDescription (const Node &node) const |
ObjectDescription | GetDescription (const Way &way) const |
Static Public Attributes | |
static const std::string | LABEL_KEY_ID_ID = "Id" |
static const std::string | LABEL_KEY_ID_KIND = "Kind" |
static const std::string | SECTION_NAME_ID = "Id" |
Service,to get a structured description of an object on the map (Area, Way or Node).
Explicitly designed, to offer information within map popup dialogs or similar.
Information is return as an ObjectDescription object.
The ObjectDescription is more or less a list of DescriptionEntry instances.
Each DescriptionEntry holds the following information:
Section, subsection and key names should be defined, that they represent english names and could be directly used in the UI. However, they could also be used as key into a localisation service.
Information is gathered by a list of processors, inheriting the FeatureToDescriptionProcessor interface.
The processors extract information mainly from the FeatureValueBuffer instance of the object.
osmscout::DescriptionService::DescriptionService | ( | ) |
ObjectDescription osmscout::DescriptionService::GetDescription | ( | const Area & | area | ) | const |
References osmscout::ObjectDescription::AddEntry(), osmscout::CalculateCellLevel(), osmscout::Area::GetBoundingBox(), osmscout::GeoBox::GetCenter(), osmscout::GeoCoord::GetDisplayText(), osmscout::GeoBox::GetDisplayText(), osmscout::Area::GetFeatureValueBuffer(), osmscout::ObjectFileRef::GetFileOffset(), osmscout::Area::GetObjectFileRef(), osmscout::ObjectFileRef::GetTypeName(), osmscout::GeometryDescriptionProcessor::LABEL_KEY_GEOMETRY_BOUNDINGBOX, osmscout::GeometryDescriptionProcessor::LABEL_KEY_GEOMETRY_CELLLEVEL, osmscout::GeometryDescriptionProcessor::LABEL_KEY_GEOMETRY_CENTER, LABEL_KEY_ID_ID, LABEL_KEY_ID_KIND, osmscout::GeometryDescriptionProcessor::SECTION_NAME_GEOMETRY, and SECTION_NAME_ID.
ObjectDescription osmscout::DescriptionService::GetDescription | ( | const FeatureValueBuffer & | buffer | ) | const |
ObjectDescription osmscout::DescriptionService::GetDescription | ( | const Node & | node | ) | const |
References osmscout::ObjectDescription::AddEntry(), osmscout::Node::GetCoords(), osmscout::GeoCoord::GetDisplayText(), osmscout::Node::GetFeatureValueBuffer(), osmscout::ObjectFileRef::GetFileOffset(), osmscout::Node::GetObjectFileRef(), osmscout::ObjectFileRef::GetTypeName(), osmscout::GeometryDescriptionProcessor::LABEL_KEY_GEOMETRY_COORDINATE, LABEL_KEY_ID_ID, LABEL_KEY_ID_KIND, osmscout::GeometryDescriptionProcessor::SECTION_NAME_GEOMETRY, and SECTION_NAME_ID.
ObjectDescription osmscout::DescriptionService::GetDescription | ( | const Way & | way | ) | const |
References osmscout::ObjectDescription::AddEntry(), osmscout::CalculateCellLevel(), osmscout::Way::GetBoundingBox(), osmscout::GeoBox::GetCenter(), osmscout::GeoCoord::GetDisplayText(), osmscout::GeoBox::GetDisplayText(), osmscout::Way::GetFeatureValueBuffer(), osmscout::ObjectFileRef::GetFileOffset(), osmscout::Way::GetObjectFileRef(), osmscout::ObjectFileRef::GetTypeName(), osmscout::GeometryDescriptionProcessor::LABEL_KEY_GEOMETRY_BOUNDINGBOX, osmscout::GeometryDescriptionProcessor::LABEL_KEY_GEOMETRY_CELLLEVEL, osmscout::GeometryDescriptionProcessor::LABEL_KEY_GEOMETRY_CENTER, LABEL_KEY_ID_ID, LABEL_KEY_ID_KIND, osmscout::GeometryDescriptionProcessor::SECTION_NAME_GEOMETRY, and SECTION_NAME_ID.
|
static |
Referenced by GetDescription().
|
static |
Referenced by GetDescription().
|
static |
Referenced by GetDescription().