AGSMapCacheSource( const TileSourceOptions& options ) :
      TileSource( options )
    {
        const Config& conf = options.getConfig();

        // this is the AGS virtual directory pointing to the map cache
        _url = conf.value( PROPERTY_URL );

        // the name of the map service cache
        _map = conf.value( PROPERTY_MAP );

        // the layer, or null to use the fused "_alllayers" cache
        _layer = conf.value( PROPERTY_LAYER );

        // the image format (defaults to "png")
        // TODO: read this from the XML tile schema file
        _format = conf.value( PROPERTY_FORMAT );

        // validate dataset
        if ( _layer.empty() )
            _layer = "_alllayers"; // default to the AGS "fused view"

        if ( _format.empty() )
            _format = "png";
    }
Exemplo n.º 2
0
FeatureTileSource::FeatureTileSource( const TileSourceOptions& options ) :
TileSource  ( options ),
_options    ( options.getConfig() ),
_initialized( false )
{
    if ( _options.featureSource().valid() )
    {
        _features = _options.featureSource().get();
    }
    else if ( _options.featureOptions().isSet() )
    {
        _features = FeatureSourceFactory::create( _options.featureOptions().value() );
        if ( !_features.valid() )
        {
            OE_WARN << LC << "Failed to create FeatureSource from options" << std::endl;
        }
    }
}