Classdesc

Layer source for tile data from WMTS servers.

Param: options

WMTS options.

Api

stable

Hierarchy

Constructors

Methods

  • Increases the revision counter and dispatches a 'change' event.

    Returns void

    Api

  • Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.

    Parameters

    Returns void

    Function

    Api

  • Gets a value.

    Parameters

    • key: string

      Key name.

    Returns any

    Value.

    Api

    stable

  • Get the dimensions, i.e. those passed to the constructor through the "dimensions" option, and possibly updated using the updateDimensions method.

    Returns Object

    Dimensions.

    Api

  • Return the image format of the WMTS source.

    Returns string

    Format.

    Api

  • Get a list of object property names.

    Returns string[]

    List of property names.

    Api

    stable

  • Return the layer of the WMTS source.

    Returns string

    Layer.

    Api

  • Return the matrix set of the WMTS source.

    Returns string

    MatrixSet.

    Api

  • Get an object of all property names and values.

    Returns {
        [k: string]: any;
    }

    Object.

    • [k: string]: any

    Api

    stable

  • Get the version number for this object. Each time the object is modified, its version number will be incremented.

    Returns number

    Revision.

    Api

  • Return the style of the WMTS source.

    Returns string

    Style.

    Api

  • Return the URLs used for this source. When a tileUrlFunction is used instead of url or urls, null will be returned.

    Returns string[]

    URLs.

    Api

  • Return the version of the WMTS source.

    Returns string

    Version.

    Api

  • Listen for a certain type of event.

    Parameters

    • type: string | string[]

      The event type or array of event types.

    • listener: Function

      The listener function.

    • Optional opt_this: Object

      The object to use as this in listener.

    Returns Object | Object[]

    Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

    Api

    stable

  • Listen once for a certain type of event.

    Parameters

    • type: string | string[]

      The event type or array of event types.

    • listener: Function

      The listener function.

    • Optional opt_this: Object

      The object to use as this in listener.

    Returns Object | Object[]

    Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

    Api

    stable

  • Refreshes the source and finally dispatches a 'change' event.

    Returns void

    Api

  • Sets a value.

    Parameters

    • key: string

      Key name.

    • value: any

      Value.

    • Optional opt_silent: boolean

      Update without triggering an event.

    Returns void

    Api

    stable

  • Set the attributions of the source.

    Parameters

    • attributions: AttributionLike

      Attributions. Can be passed as string, Array<string>, {@link ol.Attribution}, Array<{@link ol.Attribution}> or undefined.

    Returns void

    Api

  • Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).

    Parameters

    • values: {
          [k: string]: any;
      }

      Values.

      • [k: string]: any
    • Optional opt_silent: boolean

      Update without triggering an event.

    Returns void

    Api

    stable

  • Sets whether to render reprojection edges or not (usually for debugging).

    Parameters

    • render: boolean

      Render the edges.

    Returns void

    Api

  • Sets the tile grid to use when reprojecting the tiles to the given projection instead of the default tile grid for the projection.

    This can be useful when the default tile grid cannot be created (e.g. projection has no extent defined) or for optimization reasons (custom tile size, resolutions, ...).

    Parameters

    Returns void

    Api

  • Set the tile load function of the source.

    Parameters

    Returns void

    Api

  • Set the tile URL function of the source.

    Parameters

    • tileUrlFunction: TileUrlFunctionType

      Tile URL function.

    • Optional opt_key: string

      Optional new tile key for the source.

    Returns void

    Api

  • Set the URL to use for requests.

    Parameters

    • url: string

      URL.

    Returns void

    Api

    stable

  • Set the URLs to use for requests.

    Parameters

    • urls: string[]

      URLs.

    Returns void

    Api

    stable

  • Unlisten for a certain type of event.

    Parameters

    • type: string | string[]

      The event type or array of event types.

    • listener: Function

      The listener function.

    • Optional opt_this: Object

      The object which was used as this by the listener.

    Returns void

    Api

    stable

  • Removes an event listener using the key returned by on() or once(). Note that using the ol.Observable.unByKey static function is to be preferred.

    Parameters

    • key: Object | Object[]

      The key returned by on() or once() (or an array of keys).

    Returns void

    Function

    Api

    stable

  • Unsets a property.

    Parameters

    • key: string

      Key name.

    • Optional opt_silent: boolean

      Unset without triggering an event.

    Returns void

    Api

    stable

  • Update the dimensions.

    Parameters

    • dimensions: Object

      Dimensions.

    Returns void

    Api

  • Generate source options from a capabilities object.

    Parameters

    • wmtsCap: Object

      An object representing the capabilities document.

    • config: Object

      Configuration properties for the layer. Defaults for the layer will apply if not provided.

      Required config properties:

      • layer - {string} The layer identifier.

      Optional config properties:

      • matrixSet - {string} The matrix set identifier, required if there is more than one matrix set in the layer capabilities.
      • projection - {string} The desired CRS when no matrixSet is specified. eg: "EPSG:3857". If the desired projection is not available, an error is thrown.
      • requestEncoding - {string} url encoding format for the layer. Default is the first tile url format found in the GetCapabilities response.
      • style - {string} The name of the style
      • format - {string} Image format for the layer. Default is the first format returned in the GetCapabilities response.

    Returns olx.source.WMTSOptions

    WMTS source options object.

    Api

  • Removes an event listener using the key returned by on() or once().

    Parameters

    • key: Object | Object[]

      The key returned by on() or once() (or an array of keys).

    Returns void

    Api

    stable

Generated using TypeDoc