Options
All
  • Public
  • Public/Protected
  • All
Menu

A model that describes (multileveled) panoramas.

This model is similar to a UrlTileSetModel. The difference is that this model fetches panoramic imagery, instead of 2D rasters. This model is assigned to FeatureLayer.panoramaModel. In that layer's FeaturePainter you decide for what geometry or feature you want to show panoramic images (using GeoCanvas.drawPanorama.

since

2020.1

Hierarchy

Implements

  • {}

Overview

Constructors

constructor

Accessors

baseURL

  • get baseURL(): string
  • set baseURL(val: string): void
  • 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

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

    Parameters

    • val: string

    Returns any

credentials

  • get credentials(): boolean
  • set credentials(credentials: boolean): void

requestHeaders

  • get requestHeaders(): {} | null
  • set requestHeaders(requestHeaders: {} | null): void

subdomains

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

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

    Parameters

    • subdomains: string[]

    Returns any

Methods

getPanoramaDescriptor

  • Returns the image description for a given panoramic context. The context is passed from FeaturePainter.paintBody / GeoCanvas.drawPanorama.

    If your dataset has a mix of different panorama types (cubemap vs. single-image), or has a mix of tile structures, you should override this method and return the right descriptor for a given context.

    Parameters

    • feature: Feature

      the feature the panoramic image is for

    • context: PanoramaContext

      the context of this panoramic image in the feature

    Returns CubeMapPanoramaDescriptor | SingleImagePanoramaDescriptor | null

    a descriptor that describes

getPanoramicImage

  • Loads a tile of a panoramic image.

    Parameters

    • request: PanoramicImageTileRequest

      the coordinate of the tile

    • onSuccess: (request: PanoramicImageTileRequest, image: HTMLImageElement | HTMLCanvasElement) => 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: PanoramicImageTileRequest, error?: 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

getPanoramicImageURL

  • 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 string | null

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

replaceURLPatterns

  • 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 string | null

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

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