Options
All
  • Public
  • Public/Protected
  • All
Menu

A tileset model that can access a LuciadFusion LTS tile server and load tiles from coverages.

Typically, you don't need to call the constructor yourself. Instead, use the factory methods createFromURL or createFromCapabilities to create an instance of this model. The following example demonstrates how to set up a FusionTileSetModel to retrieve LTS tiles for a given service url and coverage identifier:

const serviceURL = "http://sampleservices.luciad.com/lts";
const coverageID = "92c09725-a9c5-46fb-bffd-d9e23b4abbf2";

FusionTileSetModel.createFromURL(serviceURL, coverageID)
    .then(function(model) {
      //Create a layer for the Fusion model
      const layer = new RasterTileSetLayer(model);
      //Add the layer to the map
      map.layerTree.addChild(layer);
    });

If you want to access the LTS server capabilities and explore the service metadata and available data sets, you have to create a LTSCapabilities instance first. You can also use this instance to create a FusionTileSetModel afterwards:

const serviceURL = "http://sampleservices.luciad.com/lts";
const coverageID = "92c09725-a9c5-46fb-bffd-d9e23b4abbf2";

const capabilitiesPromise = LTSCapabilities.fromURL(serviceURL);
capabilitiesPromise.then(function(capabilities) {
  //Create a model using the capabilities
  const model = FusionTileSetModel.createFromCapabilities(capabilities, coverageID);
  //Create a layer for the Fusion model
  const layer = new RasterTileSetLayer(model);
  //Add the layer to the map
  map.layerTree.addChild(layer);
});

<p>
The supported LuciadFusion coverage types are:
<ul>
  <li>IMAGE,</li>
  <li>ELEVATION,</li>
  <li>RASTER if the data content represents elevation.</li>
</ul>
</p>

Hierarchy

Implements

Overview

Constructors

constructor

Events

on

  • (event: "Invalidated", callback: (...args: any[]) => void, context?: any): Handle
  • An event indicating that this RasterTileSetModel is invalidated. Invalidated means that the underlying data for the tiled images has changed This event fires when invalidate is called.

    Parameters

    • event: "Invalidated"
    • callback: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns Handle

Accessors

baseURL

  • get baseURL(): string
  • set baseURL(value: string): void
  • The base URL configures the location of the tile server. Please refer to getTileURL for details on how the base URL is used to obtain tiles.

    Returns string

  • The base URL configures the location of the tile server. Please refer to getTileURL for details on how the base URL is used to obtain tiles.

    Parameters

    • value: string

    Returns any

bounds

coordinateType

credentials

  • get credentials(): boolean
  • set credentials(value: boolean): void
  • Indicates whether or not credentials should be included with HTTP requests.

    Set this to true if the server requires credentials, like HTTP basic authentication headers or cookies. You should disable credentials if the server is configured to allow cross-origin requests from all domains (Acces-Control-Allow-Origin=*). If the server allows CORS requests from all domains, the browser will block all requests where credentials=true.

    Once set, all subsequent HTTP requests will use the newly set value.

    The default value is false.

    Returns boolean

  • Indicates whether or not credentials should be included with HTTP requests.

    Set this to true if the server requires credentials, like HTTP basic authentication headers or cookies. You should disable credentials if the server is configured to allow cross-origin requests from all domains (Acces-Control-Allow-Origin=*). If the server allows CORS requests from all domains, the browser will block all requests where credentials=true.

    Once set, all subsequent HTTP requests will use the newly set value.

    The default value is false.

    Parameters

    • value: boolean

    Returns any

dataType

levelCount

  • get levelCount(): number

modelDescriptor

reference

requestHeaders

  • get requestHeaders(): {} | null
  • set requestHeaders(value: {} | null): void
  • Headers to send with every HTTP request.

    An object literal that represents the headers to send with every HTTP request. The property names represent HTTP header names, the property values represent the HTTP header values. This property can be set dynamically (post-construction). Once set, all subsequent HTTP requests will use the newly set headers.

    Note that when custom headers are being sent to a server on another domain, the server will have to properly respond to pre-flight CORS requests (a HTTP OPTION request sent by the browser before doing the actual request). The server has to indicate that the header can be used in the actual request, by including it in the pre-flight's Access-Control-Allow-Headers response header.

    The default value is null.

    Returns {} | null

  • Headers to send with every HTTP request.

    An object literal that represents the headers to send with every HTTP request. The property names represent HTTP header names, the property values represent the HTTP header values. This property can be set dynamically (post-construction). Once set, all subsequent HTTP requests will use the newly set headers.

    Note that when custom headers are being sent to a server on another domain, the server will have to properly respond to pre-flight CORS requests (a HTTP OPTION request sent by the browser before doing the actual request). The server has to indicate that the header can be used in the actual request, by including it in the pre-flight's Access-Control-Allow-Headers response header.

    The default value is null.

    Parameters

    • value: {} | null

    Returns any

requestParameters

  • get requestParameters(): {} | null
  • set requestParameters(value: {} | null): void
  • Custom request parameters to send along with LTS requests. The object literal can contain simple key/value pairs. Accepted values are strings, numbers and booleans. A ProgrammingError will be thrown if values of another type are used. Values must not be URL encoded.

    Assignments of other values than object literals to requestParameters will throw an Error. Clearing the parameters can be done by assigning null or an empty object literal to requestParameters. In order to trigger a refresh of the visualization on the map, can call invalidate.

    since

    2021.0

    Returns {} | null

  • Custom request parameters to send along with LTS requests. The object literal can contain simple key/value pairs. Accepted values are strings, numbers and booleans. A ProgrammingError will be thrown if values of another type are used. Values must not be URL encoded.

    Assignments of other values than object literals to requestParameters will throw an Error. Clearing the parameters can be done by assigning null or an empty object literal to requestParameters. In order to trigger a refresh of the visualization on the map, can call invalidate.

    since

    2021.0

    Parameters

    • value: {} | null

    Returns any

samplingMode

subdomains

  • get subdomains(): string[]
  • set subdomains(val: string[]): void
  • getTileURL will replace the {s} pattern in baseURL with values from subdomains. This will cause tile requests to be spread across different subdomains. Browsers limit the amount of connections to a single domain. Using subdomains avoids hitting this limit.

    The subdomains array cannot be empty if the model's baseURL contains the {s} subdomain hook.

    Returns string[]

  • getTileURL will replace the {s} pattern in baseURL with values from subdomains. This will cause tile requests to be spread across different subdomains. Browsers limit the amount of connections to a single domain. Using subdomains avoids hitting this limit.

    The subdomains array cannot be empty if the model's baseURL contains the {s} subdomain hook.

    Parameters

    • val: string[]

    Returns any

Methods

getImage

getPixelDensity

  • (level: number): number[] | null
  • Returns the pixel density of the raster data at the specified detail level. The pixel density is the number of raster elements per spatial unit , i.e. (tile pixel width) / (tile spatial width) and (tile pixel height) / (tile spatial height area), where the tile spatial dimensions are in the tilesets reference.

    Parameters

    • level: number

      the requested detail level

    Returns number[] | null

    the pixel density of the raster data at the specified detail level. It returns null if the level does not exist.

getTileBounds

  • Returns the bounds of a given tile in the tile set. The bounds are calculated based on the model bounds and the model's tileset structure.

    since

    2020.1

    Parameters

    • tile: TileCoordinate

      The tile coordinate for which you want to calculate the bounds

    Returns Bounds

    The bounds of the requested tile coordinate in the model's reference.

getTileColumnCount

  • (level: number): number | null
  • Returns the number of columns in the tile grid at the given level. Each level should have twice the number of columns of the previous one.

    Parameters

    • level: number

      the level to be queried

    Returns number | null

    the number of tile columns on the specified level

getTileData

  • Loads a tile from the tileset. The default implementation of this method calls the getImage method.

    The following code snippet illustrates how this method can be overridden.

    model.getTileData = function(tile, onSuccess, onError) {
      fetch(url).then(function(response) {
        response.arrayBuffer().then(function(arrayBuffer) {
          onSuccess(tile, {
            data: arrayBuffer,
            mimeType: "image/jpeg"
          });
        })
      });

    Parameters

    • tile: TileCoordinate

      the coordinate of the tile

    • onSuccess: (tile: TileCoordinate, data: TileData) => void

      the callback function that should be invoked when the tile was successfully loaded The function will receive two arguments, the tile coordinate that was passed to this function and a TileData object.

    • onError: (tile: TileCoordinate, error: any) => void

      the callback function that should be invoked when the tile could not be loaded The function will receive two arguments, the tile coordinate that was passed to this function and an optional Error object.

    • abortSignal: AbortSignal | null

      an AbortSignal that signals when a tile request is cancelled.

    Returns void

getTileHeight

  • (level: number): number | null
  • Returns the height, in pixels, of the tiles at the specified detail level. All tiles are assumed to have the same resolution.

    Parameters

    • level: number

      the requested detail level

    Returns number | null

    the height of the tiles at the specified detail level

getTileRowCount

  • (level: number): number | null
  • Returns the number of rows in the tile grid at the given level. Each level should have twice the number of rows of the previous one.

    Parameters

    • level: number

      the level to be queried

    Returns number | null

    the number of tile rows on the specified level

getTileURL

getTileWidth

  • (level: number): number | null
  • Returns the width, in pixels, of the tiles at the specified detail level. All tiles are assumed to have the same resolution.

    Parameters

    • level: number

      the requested detail level

    Returns number | null

    the width of the tiles at the specified detail level

invalidate

  • (): void

Static createFromCapabilities

  • Create a FusionTileSetModel for the given coverage and options. This is the recommended method to create a model based on information provided by LTSCapabilities.

    since

    2019.1

    Parameters

    Returns FusionTileSetModel

    a FusionTileSetModel for the given parameters.

Static createFromURL

  • Create a new FusionTileSetModel for the given LuciadFusion coverage. This is the recommended method to create a model based on a given LuciadFusion LTS server URL and coverage identifier.

    since

    2019.1

    Parameters

    • url: string

      The URL of the LuciadFusion LTS server.

    • coverageId: string

      The identifier of a LuciadFusion coverage

    • Optional options: FusionTileSetModelCreateOptions

      the options for the Fusion tile set model

    Returns Promise<FusionTileSetModel>

    a FusionTileSetModel for the given parameters. The promise is rejected if the model creation fails.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method