osgEarth 2.1.1
|
Public Member Functions | |
virtual void | scan (const Config &conf, Style &style) |
Definition at line 26 of file KML_IconStyle.
Definition at line 22 of file KML_IconStyle.cpp.
{ if ( !conf.empty() ) { MarkerSymbol* marker = style.getOrCreate<MarkerSymbol>(); // Icon/Href or just Icon are both valid std::string iconHref = conf.child("icon").value("href"); if ( iconHref.empty() ) iconHref = conf.value("icon"); if ( !iconHref.empty() ) { marker->url() = StringExpression( iconHref ); marker->url()->setURIContext( conf.uriContext() ); } optional<float> scale; conf.getIfSet( "scale", scale ); if ( scale.isSet() ) marker->scale() = NumericExpression( *scale ); } }