osgEarth 2.1.1
Public Member Functions

KML_IconStyle Struct Reference

Inheritance diagram for KML_IconStyle:
Collaboration diagram for KML_IconStyle:

List of all members.

Public Member Functions

virtual void scan (const Config &conf, Style &style)

Detailed Description

Definition at line 26 of file KML_IconStyle.


Member Function Documentation

void KML_IconStyle::scan ( const Config conf,
Style style 
) [virtual]

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 );
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines