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
- readFeature
- readFeatures
- readGeometry
- readProjection
- writeFeature
- writeFeatures
- writeGeometry

## Constructors

### constructor

- new FeatureHash(opt_options: {}): FeatureHash

- Overrides TextFeature.__constructor

  - Defined in src/format/FeatureHash.js:149

  #### Parameters

  - ##### opt_options: {}

    Options.

  #### Returns FeatureHash

## Methods

### getType

- getType(): string

- Inherited from FeatureHash.getType

  Overrides FeatureFormat.getType

  - Defined in node_modules/ol/src/format/TextFeature.js:24
  inheritdoc

  #### Returns string

### readFeature

- readFeature(source: string | Object | Node | Document, opt_options: {}): Feature<any>

- Inherited from FeatureHash.readFeature

  Overrides FeatureFormat.readFeature

  - Defined in node_modules/ol/src/format/TextFeature.js:36

  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>[]

- Inherited from FeatureHash.readFeatures

  Overrides FeatureFormat.readFeatures

  - Defined in node_modules/ol/src/format/TextFeature.js:59

  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

- Inherited from FeatureHash.readGeometry

  Overrides FeatureFormat.readGeometry

  - Defined in node_modules/ol/src/format/TextFeature.js:82

  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

- Inherited from FeatureHash.readProjection

  Overrides FeatureFormat.readProjection

  - Defined in node_modules/ol/src/format/TextFeature.js:104

  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

- Inherited from FeatureHash.writeFeature

  Overrides FeatureFormat.writeFeature

  - Defined in node_modules/ol/src/format/TextFeature.js:125

  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

- Inherited from FeatureHash.writeFeatures

  Overrides FeatureFormat.writeFeatures

  - Defined in node_modules/ol/src/format/TextFeature.js:148

  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

- Inherited from FeatureHash.writeGeometry

  Overrides FeatureFormat.writeGeometry

  - Defined in node_modules/ol/src/format/TextFeature.js:171

  Write a single geometry.

  api

  #### Parameters

  - ##### geometry: Geometry

    Geometry.

  - ##### opt_options: {}

    Write options.

  #### Returns string

  Geometry.

Generated using TypeDoc