LuciadRIA (2026.1.02)
    Preparing search index...

    A tileset model that can access an OGC WMS server. Because this model requests a map as a collection of individual tiles, certain visualization artifacts may occur. For example, text may appear cut-off at the border, or there may be slight pixellation effects when a tile is stretched or compressed to fit the screen. To avoid these artifacts, please use a WMSImageModel instead. A `WMSTileSetModel` is generally preferred over a `WMSImageModel` when the imagery shows continuous data, such as orthophotography or elevation. Use a `WMSImageModel` when the imagery contains text or rasterized vector data.

    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 `WMSTileSetModel` to retrieve WMS image data for a given service url and layer name:

    WMSTileSetModel.createFromURL("https://sampleservices.luciad.com/wms", [{layer: "rivers"}])
    .then(function(model) {
    //Create a layer for the WMS model
    const layer = new WMSTileSetLayer(model);
    //Add the layer to the map
    map.layerTree.addChild(layer);
    });

    If you want to access the WMS server capabilities and explore the service metadata and available data sets, you must create a WMSCapabilities instance first. You can also use that instance to create a `WMSTileSetModel` afterwards:

    const capabilitiesPromise = WMSCapabilities.fromURL("https://sampleservices.luciad.com/wms");
    capabilitiesPromise.then(function(capabilities) {
    //Create a model using the capabilities
    const model = WMSTileSetModel.createFromCapabilities(capabilities, [{layer: "rivers"}]);
    //Create a layer for the WMS model
    const layer = new WMSTileSetLayer(model);
    //Add the layer to the map
    map.layerTree.addChild(layer);
    });

    Supported versions

    LuciadRIA supports consuming WMS services that support version 1.1.1 and 1.3.0 of the OGC WMS specification.

    2015.0

    Hierarchy (View Summary)

    • Creates a WMS TileSet Model. By default, the model will define a quad tree tile pyramid based on the model bounds, and will use this structure to request images from the WMS server.

      It is possible to configure the `WMSTileSetModel` tile structure by passing `RasterTileSetModel` constructor parameters to the `WMSTileSetModel` constructor: `tileWidth`, `tileHeight`, `level0Rows`, `level0Columns`, `levelCount`. If you define at least one of these parameters, the bounds of the model may be adapted to match the aspect ratio of the tile pyramid.

      Parameters

      Returns WMSTileSetModel

      ProgrammingError if any of the following cases occurs:

      • `reference` and `bounds` are both passed in the `options` and the references do not match.
      • both `sld` and `sldBody` are specified in the `options`.
    • get backgroundColor(): string | null

      The background color the WMS server must use when generating the WMS images. Note that this option is only considered by the server when the transparent property is false. The backgroundColor is a string that must be formatted as "0xRRGGBB", where RGB values are represented as hexadecimal numbers. If you try to assign a string that does not adhere to this format an exception will be thrown.

      Returns string | null

    • set backgroundColor(val: string | null): void

      Parameters

      • val: string | null

      Returns void

    • get baseURL(): string

      The base URL used to request tiles. This is equivalent to getMapRoot.

      Returns 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.

      Parameters

      • value: string

      Returns void

    • get bounds(): Bounds | null

      The Bounds by which the geometry of this Bounded object is bounded or null if the bounds is not defined.

      Returns Bounds | null

    • get coordinateType(): CoordinateType

      The coordinate type of geometries in this model

      Returns CoordinateType

    • get credentials(): 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.

      Returns boolean

    • set credentials(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get dataType(): RasterDataType

      Returns the data type of this RasterTileSetModel.

      Returns RasterDataType

    • get dimensions(): object | null

      Dimension parameters to send along with WMS `GetMap` and `GetFeatureInfo` request. Typical dimensions are `TIME` and `ELEVATION`.

      The object literal can contain simple key/value pairs. Dimension names will be prefixed with "DIM_" in the WMS requests, if this is not already the case. The dimension names `TIME` and `ELEVATION` will never be prefixed. Accepted values are strings, numbers, booleans. A ProgrammingError will be thrown if values of another type are used. Values must not be URL encoded. Assigning other values than object literals to `dimensions` will throw a ProgrammingError.

      Assigning to this property will automatically trigger a refresh of the visualization on the map.

      The example below configures a WMSTileSet model to request temperature data on the 1st of july 2016, at ground level.

      wmsTileSetModel.dimensions = {
      TIME: "2016-07-01T12:00:00.000Z",
      ELEVATION: 0
      };

      Returns object | null

      2016.1

    • set dimensions(value: object | null): void

      Parameters

      • value: object | null

      Returns void

    • get getFeatureInfoPostRoot(): string | null

      Root URI for HTTP POST GetFeatureInfo requests. When the GET URLs would exceed maxRequestURLSize, this URI is used instead to send GetFeatureInfo requests using HTTP POST. If absent, POST is never used for GetFeatureInfo.

      Returns string | null

      2026.1

    • set getFeatureInfoPostRoot(value: string | null): void

      Parameters

      • value: string | null

      Returns void

    • get getFeatureInfoRoot(): string

      Root URI of the GetFeatureInfo request interface

      Returns string

      2024.0

    • set getFeatureInfoRoot(value: string): void

      Parameters

      • value: string

      Returns void

    • get getMapPostRoot(): string | null

      Root URI for HTTP POST GetMap requests. When the GET URLs would exceed maxRequestURLSize, this URI is used to send GetMap requests using HTTP POST. If absent, POST is never used for GetMap.

      Returns string | null

      2026.1

    • set getMapPostRoot(value: string | null): void

      Parameters

      • value: string | null

      Returns void

    • get getMapRoot(): string

      Returns string

    • set getMapRoot(value: string): void

      Root URI of the getMap request interface.

      Parameters

      • value: string

      Returns void

      2024.0

    • get layers(): string[]

      The WMS layers, specified as an array of strings. Each string is a layer name identifier.

      These layers are not the same as a `luciad.view.Layer`. They are the layers exposed by the WMS server and which are listed in the capabilities document of the WMS server.

      This layers array must be considered as an immutable property. This means that to add or to remove layers, you will need to reassign this property again. Directly removing elements from the array, or directly adding elements to the array, without resetting the property will have no effect.

      The order of the layers in the array corresponds to the rendering order of the layers by the WMS server.

      Assigning to this property will automatically trigger a refresh of the visualization on the map.

      Returns string[]

    • set layers(layers: string[]): void

      Parameters

      • layers: string[]

      Returns void

    • get levelCount(): number

      The number of available detail levels. Level 0 is the coarsest level.

      Returns number

    • get maxRequestURLSize(): number | null

      Maximum URL length (in characters) for GET requests. When a generated request URL exceeds this threshold and a POST root is configured, the request is sent as HTTP POST instead. Request parameters will be encoded as application/x-www-form-urlencoded in the request body.

      Returns number | null

      2026.1

    • set maxRequestURLSize(value: number | null): void

      Parameters

      • value: number | null

      Returns void

    • get modelDescriptor(): ModelDescriptor

      An object containing metadata about this model

      Returns ModelDescriptor

    • set modelDescriptor(modelDescriptor: ModelDescriptor): void

      An object containing metadata about this model

      Parameters

      Returns void

    • get queryable(): boolean

      Reports whether this model supports GetFeatureInfo requests. This is only true if the protocol version is '1.3.0' or later, and if the queryLayers property was filled in when constructing this model.

      Returns boolean

    • get queryLayers(): string[]

      The WMS layers that will be queried. These are the layers that will be used in the `GetFeatureInfo` requests performed by the getFeatureInfo method.

      The query layers are specified as an array of strings. Each string is a layer name identifier.

      This queryLayers array must be considered as an immutable property. This means that to add or to remove layers, you will need to reassign this property again. Directly removing elements from the array, or directly adding elements to the array, without resetting the property will have no effect.

      Assigning to this property will automatically trigger a refresh of the visualization on the map.

      Returns string[]

    • set queryLayers(queryLayers: string[]): void

      Parameters

      • queryLayers: string[]

      Returns void

    • get requestHeaders(): HttpRequestHeaders | 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.

      Returns HttpRequestHeaders | null

    • set requestHeaders(value: HttpRequestHeaders | null): void

      Parameters

      Returns void

    • get requestParameters(): HttpRequestParameters | null

      Custom request parameters to send along with WMS `GetMap` and `GetFeatureInfo` request. The object literal can contain simple key/value pairs. If you try to configure request parameters that are part of the WMS standard, a ProgrammingError will be thrown. For example, adding a "layers" request parameter is not allowed. 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`. Assigning to this property will automatically trigger a refresh of the visualization on the map.

      Returns HttpRequestParameters | null

      2016.1

    • set requestParameters(value: HttpRequestParameters | null): void

      Custom request parameters to send along with tile request. 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.

      Parameters

      Returns void

      2021.0.03

    • get sld(): string | null

      A url to a Styled Layer Descriptor that must be passed when making a request. This corresponds to the SLD request parameter in the GetMap request. If you assign to this value, the value of the sldBody property, if any, will be reset to null.

      Assigning to this property will automatically trigger a refresh of the visualization on the map.

      Returns string | null

      2016.1

    • set sld(value: string | null): void

      Parameters

      • value: string | null

      Returns void

    • get sldBody(): string | null

      the Styled Layer Descriptor to pass when making a request. This corresponds to the SLD_BODY request parameter in the GetMap request. The SLD must not be URL encoded.

      If you assign to this value, the value of the sldBody property, if any, will be reset to null.

      Assigning to this property will automatically trigger a refresh of the visualization on the map.

      Returns string | null

      2016.1

    • set sldBody(value: string | null): void

      Parameters

      • value: string | null

      Returns void

    • get styles(): string[]

      The named styles to apply on the server when making a request. The style names in the array apply to the respective layers. Specifying a style name for a layer is optional; if you do not wish to specify a style name for a particular layer, you can omit the entry for that layer or pass an empty string in the styles array. The STYLES request parameter is mandatory in a WMS request, but can be empty in case no styles are defined.

      Assigning to this property will automatically trigger a refresh of the visualization on the map.

      Returns string[]

      2016.1

    • set styles(value: string[]): void

      Parameters

      • value: string[]

      Returns void

    • get subdomains(): 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.

      Returns string[]

    • set subdomains(val: string[]): void

      Parameters

      • val: string[]

      Returns void

    • get transparent(): boolean

      Indicates whether the WMSTileSetModel will request transparent tiles from the server or not.

      Returns boolean

    • set transparent(val: boolean): void

      Parameters

      • val: boolean

      Returns void

    • Returns the bounds of the tile set at the specified detail level.

      Parameters

      • level: number

        the requested detail level.

      Returns Bounds | null

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

      2023.0

    • Loads a tile from the tileset.

      Parameters

      • tile: TileCoordinate

        the coordinate of the tile

      • onSuccess: (tile: TileCoordinate, image: HTMLImageElement) => 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 an Image 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 by LuciadRIA. Currently, LuciadRIA does not cancel tile requests for RasterTileSetModels. This was changed as cancellation often results in even more load on the server. Cancelled requests still need to be handled server-side, and LuciadRIA would issue more tile requests to replace the cancelled ones.

      Returns void

    • 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.

    • 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.

      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.

      2020.1

    • 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

    • 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 by LuciadRIA. Currently, LuciadRIA does not cancel tile requests for RasterTileSetModels. This was changed as cancellation often results in even more load on the server. Cancelled requests still need to be handled server-side, and LuciadRIA would issue more tile requests to replace the cancelled ones.

      Returns void

    • 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

    • 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

    • Returns the URL for a specific tile. The default implementation of this method returns baseURL, replacing the strings {x}, {y} and {z} with the values of tile.x, tile.y and tile.level respectively.

      It is not uncommon that the tile rows are seem to be reversed in the visualisation. This means that the Y-axis in the tile coordinate system of the tile service is reversed with respect to the tile coordinate system used by LuciadRIA. You can use the {-y} placeholder in the baseURL to compensate for this.

      If the baseURL contains the {s} subdomains hook, getTileURL() will replace the hook with one of the values of subdomains.

      Parameters

      • baseURL: string

        the base URL that was passed to the constructor.

      • tile: TileCoordinate

        the coordinate of the tile

      Returns string | null

      the resolved URL for the specified tile or null if the requested tile does not exist.

    • 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

    • Signals that the underlying data for the tiled images has changed. If this model is added to a map using a RasterTileSetLayer, calling this method will thus trigger a refresh of the visualization.

      Returns void

    • Creates a tileset model for the given layers and options. This is the recommended method to create a model based on information provided by WMSCapabilities. This is the recommended method to create a model based on a given WMS server URL and layer name(s).

      Parameters

      Returns WMSTileSetModel

      a WMSTileSetModel for the given parameters.

      2019.1

      ProgrammingError if any of the following cases occurs:

      • the `reference` or the reference of the `bounds` passed in the `options`. are not supported by the WMS server's capabilities.
      • `reference` and `bounds` are both passed in the `options` and the references do not match.
      • both `sld` and `sldBody` are specified in the `options`.
    • Creates a tileset model for the given layers and options. This is the recommended method to create a model based on a given WMS server URL and layer names. This is the recommended method to create a model based on a given WMS server URL and layer name(s).

      Parameters

      • url: string

        The URL of the WMS server.

      • wmsLayers: WMSCapabilitiesLayerConfig[]

        An array of object literals that defines the desired WMS layers and optionally their layer styles. Each object literal has a mandatory layer property and an optional style property, both of type String.

      • Optionaloptions: WMSTileSetModelCreateOptions

        The options for the WMS model.

      Returns Promise<WMSTileSetModel>

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

      2019.1

    • 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
      • Optionalcontext: any

      Returns Handle