Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FeatureHash

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

Index

Constructors

constructor

Methods

getType

  • getType(): string
  • inheritdoc

    Returns string

readFeature

  • readFeature(source: string | Object | Node | Document, opt_options: {}): Feature<any>
  • Read the feature from the source.

    api

    Parameters

    • source: string | Object | Node | Document

      Source.

    • opt_options: {}

      Read options.

    Returns Feature<any>

    Feature.

readFeatures

  • readFeatures(source: string | Object | Node | Document, opt_options: {}): Feature<any>[]
  • Read the features from the source.

    api

    Parameters

    • source: string | Object | Node | Document

      Source.

    • opt_options: {}

      Read options.

    Returns Feature<any>[]

    Features.

readGeometry

  • readGeometry(source: string | Object | Node | Document, opt_options: {}): Geometry
  • Read the geometry from the source.

    api

    Parameters

    • source: string | Object | Node | Document

      Source.

    • opt_options: {}

      Read options.

    Returns Geometry

    Geometry.

readProjection

  • readProjection(source: string | Object | Node | Document): Projection
  • Read the projection from the source.

    api

    Parameters

    • source: string | Object | Node | Document

      Source.

    Returns Projection

    Projection.

writeFeature

  • writeFeature(feature: Feature<any>, opt_options: {}): string
  • Encode a feature as a string.

    api

    Parameters

    • feature: Feature<any>

      Feature.

    • opt_options: {}

      Write options.

    Returns string

    Encoded feature.

writeFeatures

  • writeFeatures(features: Feature<any>[], opt_options: {}): string
  • Encode an array of features as string.

    api

    Parameters

    • features: Feature<any>[]

      Features.

    • opt_options: {}

      Write options.

    Returns string

    Encoded features.

writeGeometry

  • writeGeometry(geometry: Geometry, opt_options: {}): string
  • Write a single geometry.

    api

    Parameters

    • geometry: Geometry

      Geometry.

    • opt_options: {}

      Write options.

    Returns string

    Geometry.

Generated using TypeDoc