osgEarth 2.1.1
|
Public Types | |
enum | CoordinateSystemType { CSTYPE_GEOCENTRIC, CSTYPE_GEOCENTRIC_CUBE, CSTYPE_PROJECTED } |
Public Member Functions | |
MapOptions (const ConfigOptions &options=ConfigOptions()) | |
optional< std::string > | name () |
const optional< std::string > | name () const |
optional< CoordinateSystemType > & | coordSysType () |
const optional < CoordinateSystemType > & | coordSysType () const |
optional< ProfileOptions > & | profile () |
const optional< ProfileOptions > & | profile () const |
optional< CacheOptions > & | cache () |
const optional< CacheOptions > & | cache () const |
optional< std::string > & | referenceURI () |
const optional< std::string > & | referenceURI () const |
Config | getConfig () const |
void | mergeConfig (const Config &conf) |
Private Member Functions | |
void | fromConfig (const Config &conf) |
Private Attributes | |
optional< std::string > | _name |
optional< ProfileOptions > | _profileOptions |
optional< CacheOptions > | _cacheOptions |
optional< CoordinateSystemType > | _cstype |
optional< std::string > | _referenceURI |
Configuration for a runtime map.
Definition at line 35 of file MapOptions.
Definition at line 38 of file MapOptions.
osgEarth::MapOptions::MapOptions | ( | const ConfigOptions & | options = ConfigOptions() | ) | [inline] |
Definition at line 46 of file MapOptions.
: ConfigOptions( options ), _cstype( CSTYPE_GEOCENTRIC ), _referenceURI("") { fromConfig(_conf); }
optional<CacheOptions>& osgEarth::MapOptions::cache | ( | ) | [inline] |
Caching setup for the entire map. By default, map layers added to the map will inherit this setup unless they override or customize it with their own settings.
Definition at line 77 of file MapOptions.
{ return _cacheOptions; }
const optional<CacheOptions>& osgEarth::MapOptions::cache | ( | ) | const [inline] |
Definition at line 78 of file MapOptions.
{ return _cacheOptions; }
const optional<CoordinateSystemType>& osgEarth::MapOptions::coordSysType | ( | ) | const [inline] |
Definition at line 64 of file MapOptions.
{ return _cstype; }
optional<CoordinateSystemType>& osgEarth::MapOptions::coordSysType | ( | ) | [inline] |
The coordinate system type of the map (default is CSTYPE_GEOCENTRIC)
Definition at line 63 of file MapOptions.
{ return _cstype; }
void MapOptions::fromConfig | ( | const Config & | conf | ) | [private] |
Definition at line 24 of file MapOptions.cpp.
{ conf.getIfSet( "name", _name ); conf.getObjIfSet( "profile", _profileOptions ); conf.getObjIfSet( "cache", _cacheOptions ); // all variations: conf.getIfSet( "type", "geocentric", _cstype, CSTYPE_GEOCENTRIC ); conf.getIfSet( "type", "globe", _cstype, CSTYPE_GEOCENTRIC ); conf.getIfSet( "type", "round", _cstype, CSTYPE_GEOCENTRIC ); conf.getIfSet( "type", "projected", _cstype, CSTYPE_PROJECTED ); conf.getIfSet( "type", "flat", _cstype, CSTYPE_PROJECTED ); conf.getIfSet( "type", "cube", _cstype, CSTYPE_GEOCENTRIC_CUBE ); }
Config MapOptions::getConfig | ( | ) | const [virtual] |
Reimplemented from osgEarth::ConfigOptions.
Definition at line 40 of file MapOptions.cpp.
{ Config conf; // get a fresh one since this is a final object // = ConfigOptions::getConfig(); conf.updateIfSet( "name", _name ); conf.updateObjIfSet( "profile", _profileOptions ); conf.updateObjIfSet( "cache", _cacheOptions ); // all variations: conf.updateIfSet( "type", "geocentric", _cstype, CSTYPE_GEOCENTRIC ); conf.updateIfSet( "type", "projected", _cstype, CSTYPE_PROJECTED ); conf.updateIfSet( "type", "cube", _cstype, CSTYPE_GEOCENTRIC_CUBE ); return conf; }
void osgEarth::MapOptions::mergeConfig | ( | const Config & | conf | ) | [inline, virtual] |
Reimplemented from osgEarth::ConfigOptions.
Definition at line 91 of file MapOptions.
{ ConfigOptions::mergeConfig( conf ); fromConfig( conf ); }
const optional<std::string> osgEarth::MapOptions::name | ( | ) | const [inline] |
Definition at line 58 of file MapOptions.
{ return _name; }
optional<std::string> osgEarth::MapOptions::name | ( | ) | [inline] |
const optional<ProfileOptions>& osgEarth::MapOptions::profile | ( | ) | const [inline] |
Definition at line 71 of file MapOptions.
{ return _profileOptions; }
optional<ProfileOptions>& osgEarth::MapOptions::profile | ( | ) | [inline] |
An explicit master profile for the Map. Usually this is calculated automatically, but in some cases you need to set it manually.
Definition at line 70 of file MapOptions.
{ return _profileOptions; }
optional<std::string>& osgEarth::MapOptions::referenceURI | ( | ) | [inline] |
A reference location that drivers can use to load data from relative locations. NOTE: this is a runtime-only property and is NOT serialized in the ConfigOptions.
Definition at line 85 of file MapOptions.
{ return _referenceURI; }
const optional<std::string>& osgEarth::MapOptions::referenceURI | ( | ) | const [inline] |
Definition at line 86 of file MapOptions.
{ return _referenceURI; }
Definition at line 101 of file MapOptions.
Definition at line 102 of file MapOptions.
optional<std::string> osgEarth::MapOptions::_name [private] |
Definition at line 99 of file MapOptions.
Definition at line 100 of file MapOptions.
optional<std::string> osgEarth::MapOptions::_referenceURI [private] |
Definition at line 103 of file MapOptions.