A PanoramaModel that understands the LuciadFusion panorama feature structure and images location.

Example usage:

const cubemapJsonUrl = "https://sampledata.luciad.com/data/panoramics/LucernePegasus/cubemap.json";
const store = new UrlStore({target: cubemapJsonUrl});
const model = new FeatureModel(store, {reference: getReference("CRS:84")});
const fusionPanoramaModel = new FusionPanoramaModel(cubemapJsonUrl);
const panoramaFeaturePainter = new PanoramaFeaturePainter({overview: false, iconHeightOffset: 2.5}); // found in the Panorama sample
const layer = new FeatureLayer(model, {
painter: panoramaFeaturePainter,
label: "Fusion panoramas",
panoramaModel: fusionPanoramaModel
});
map.layerTree.addChild(layer);

Since

2020.1

Hierarchy

Constructors

Accessors

  • get baseURL(): string
  • The base URL configures the location of the panoramic image server. See getPanoramicImageURL for details on how the base URL is used to construct actual image URLs.

    Returns string

  • set baseURL(val): void
  • Parameters

    • val: string

    Returns void

  • get requestParameters(): null | HttpRequestParameters
  • Custom request parameters to send along with panoramic requests. The object literal can contain simple key/value pairs. Accepted values are strings, numbers and booleans. 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.

    Returns null | HttpRequestParameters

    Since

    2021.0

  • set requestParameters(value): void
  • Parameters

    Returns void

  • get subdomains(): string[]
  • getPanoramicImageURL 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(subdomains): void
  • Parameters

    • subdomains: string[]

    Returns void

Methods

  • Loads a tile of a panoramic image.

    Parameters

    • request: PanoramicImageTileRequest

      the coordinate of the tile

    • onSuccess: ((request, image) => void)

      a callback function that should be invoked when the image was successfully loaded The function takes three arguments: the tile request that was passed to this function, an image object and an optional content type.

    • onError: ((request, error?) => void)

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

    Returns void

  • Returns the URL for a specific panoramic image tile request. The default implementation of this method returns baseURL, replacing the patterns in the baseURL with the ones supported by replaceURLPatterns.

    Parameters

    Returns null | string

    the resolved URL for the specified tile or null if the requested tile does not exist, or no URL could be determined (for example, when baseURL is not set).

  • Replaces patterns in the given URL.

    By default, it will replace {x}, {y}, {z}, {face} and {id} with the values of request.x, request.y, request.level, request.face (mapped) and feature.id respectively. Additionally, it will replace {context.*} with a corresponding property on your context object.

    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 URL contains the {s} subdomains hook, replaceURLPatterns will replace the hook with one of the values of subdomains.

    Parameters

    • urlWithPatterns: string

      The URL that contains the patterns to replace.

    • request: PanoramicImageTileRequest

      The request for the panoramic image

    Returns null | string

    The URL with its patterns replaced, or null if no replacement could be made. This can happen when the URL is null, or no panorama descriptor could be found for the request (getPanoramaDescriptor returns null).