osgEarth 2.1.1
|
Public Types | |
typedef std::vector< std::string > | FormatList |
Public Member Functions | |
WMSCapabilities () | |
const std::string & | getVersion () |
void | setVersion (const std::string &version) |
FormatList & | getFormats () |
Layer::LayerList & | getLayers () |
std::string | suggestExtension () |
Layer * | getLayerByName (const std::string &name) |
Protected Attributes | |
FormatList | _formats |
Layer::LayerList | _layers |
std::string | _version |
WMS Capabilities
Definition at line 188 of file Capabilities.
typedef std::vector<std::string> osgEarth::WMSCapabilities::FormatList |
A list of supported formats
Definition at line 204 of file Capabilities.
WMSCapabilities::WMSCapabilities | ( | ) |
Definition at line 99 of file Capabilities.cpp.
{ }
FormatList& osgEarth::WMSCapabilities::getFormats | ( | ) | [inline] |
WMSLayer * WMSCapabilities::getLayerByName | ( | const std::string & | name | ) |
Finds the child Layer with the given name.
Definition at line 130 of file Capabilities.cpp.
{ return ::getLayerByName(name, _layers); }
Layer::LayerList& osgEarth::WMSCapabilities::getLayers | ( | ) | [inline] |
Gets the Layer's for the Capabilities.
Definition at line 214 of file Capabilities.
{return _layers;}
const std::string& osgEarth::WMSCapabilities::getVersion | ( | ) | [inline] |
void osgEarth::WMSCapabilities::setVersion | ( | const std::string & | version | ) | [inline] |
Sets the WMS capabilities version
Definition at line 201 of file Capabilities.
{_version = version;}
std::string WMSCapabilities::suggestExtension | ( | ) |
Suggests an extension to use for WMS layers defined for the service. This function will analyze the list of formats contained in the Capabilities request and recommend the first format that has an OpenSceneGraph ReaderWriter that can support it's extension.
Definition at line 103 of file Capabilities.cpp.
{ //Default to png std::string ext = "png"; //Find the first format that we have an osg ReaderWriter for for (unsigned int i = 0; i < _formats.size(); ++i) { std::string format = _formats[i]; //Strip off the "image/" if ((format.length() > 6) && (format.compare(0,6,"image/") == 0)) { format = format.substr(6); //See if we have a ReaderWriter for the extension osgDB::ReaderWriter* rw = osgDB::Registry::instance()->getReaderWriterForExtension( format ); if (rw) { ext = format; OE_DEBUG << "suggestExtension found ReaderWriter for " << ext << std::endl; break; } } } return ext; }
FormatList osgEarth::WMSCapabilities::_formats [protected] |
Definition at line 234 of file Capabilities.
Layer::LayerList osgEarth::WMSCapabilities::_layers [protected] |
Definition at line 235 of file Capabilities.
std::string osgEarth::WMSCapabilities::_version [protected] |
Definition at line 236 of file Capabilities.