Language
Mobile SDK Guide
  1. Access Image

    Access Image

    Note: To gain access to OneAtlas Data you need to be authenticated (see the dedicated prerequisites section to get an API key)

    The SDK View service allows users to easily access to images without having to download and maintain DIMAP products. Here is a sample code designed to get the WMTS URL of a feature:

    // retrieve the Feature's Capabilities
    [[[OneAtlas sharedInstance] viewService] getWMTS:my_feature
                                           withBlock:^(OACapabilities *aCapabilities, OAError *aError) {
        if(aError) {
            // handle error
        }
        else {
            NSString * default_layer_id = @"default";
            NSString * tile_matrix_set = @"EPSG3857";
    
            // you can now use this WMTS template URL with your mapping engine !
            NSString * url_template = [aCapabilities wmtsTemplateURLWithTileMatrixSet:tile_matrix_set
                                                                                layerID:default_layer_id
                                                                                 useXYZ:YES];
       }
    }];
    
    // retrive an OAProductFeature
    let my_feature = aFeatures?[0] as! OAProductFeature
    
    // retrieve the Feature's Capabilities
    OneAtlas.sharedInstance()?.viewService.getWMTS (my_feature, with: { (aCapabilities, aError) in
        if let err = aError {
            // handle error
        }
        else {
            let default_layer_id = "default";
            let tile_matrix_set = "EPSG3857";
    
            // you can now use this WMTS template URL with your mapping engine !
            let url_template = aCapabilities?.wmtsTemplateURL(withTileMatrixSet: tile_matrix_set, layerID: default_layer_id, useXYZ: true)
        }
    })
    

    Once done you can use your favorite map engine to display OneAtlas product tiles layer. As an example you are able to stream our Living Library images or your custom products:

    Living Library Image - Toulouse

    With a high zoom level capability:

    Living Library Image Zoom - Toulouse