Provide an OpenLayers format for encoding and decoding features for use in permalinks.

The code is based on Stéphane Brunner's URLCompressed format.

TODOs:

  • The OpenLayers-URLCompressed format has options where the user can define attribute and style transformers. This is currently not supported by this format.
  • The OpenLayers-URLCompressed format has a "simplify" option. This format does not have it.
  • ol.style.Icon styles are not supported.
  • Transformation of coordinates during encoding and decoding is not supported.

See

https://github.com/sbrunner/OpenLayers-URLCompressed

Hierarchy

  • TextFeature
    • default

Constructors

Methods

Constructors

Methods

  • Read a logical sequence of characters and return (or complete then return) an array of numbers. The coordinates are assumed to be in two dimensions and in latitude, longitude order. corresponding to a geometry's coordinates.

    Returns

    Flat coordinates.

    Parameters

    • text: string

      Text.

    • Optional opt_flatCoordinates: number[]

      Flat coordinates array.

    Returns number[]

Generated using TypeDoc