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

- decodeCoordinates_
- getType
- readFeature
- readFeatures
- readGeometry
- readProjection
- writeFeature
- writeFeatures
- writeGeometry

## Constructors

### constructor

- new FeatureHash(opt_options: FeatureHashOptions): FeatureHash

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

  #### Parameters

  - ##### opt_options: FeatureHashOptions

  #### Returns FeatureHash

## Methods

### decodeCoordinates_

- decodeCoordinates_(text: string, opt_flatCoordinates: number[]): number[]

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

  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.

  #### Parameters

  - ##### text: string

    Text.

  - ##### opt_flatCoordinates: number[]

  #### Returns number[]

  Flat coordinates.

### getType

- getType(): any

- Inherited from ArcGISGeoJSON.getType

  - Defined in node_modules/ol/format/Feature.d.ts:157
  abstract

  #### Returns any

  Format.

### readFeature

- readFeature(source: Document | Element | any | string, opt_options?: ReadOptions | undefined): FeatureLike

- Inherited from ArcGISGeoJSON.readFeature

  - Defined in node_modules/ol/format/Feature.d.ts:166

  Read a single feature from a source.

  abstract

  #### Parameters

  - ##### source: Document | Element | any | string

    Source.

  - ##### Optional opt_options: ReadOptions | undefined

    Read options.

  #### Returns FeatureLike

  Feature.

### readFeatures

- readFeatures(source: Document | Element | ArrayBuffer | any | string, opt_options?: ReadOptions | undefined): Array<FeatureLike>

- Inherited from ArcGISGeoJSON.readFeatures

  - Defined in node_modules/ol/format/Feature.d.ts:175

  Read all features from a source.

  abstract

  #### Parameters

  - ##### source: Document | Element | ArrayBuffer | any | string

    Source.

  - ##### Optional opt_options: ReadOptions | undefined

    Read options.

  #### Returns Array<FeatureLike>

  Features.

### readGeometry

- readGeometry(source: Document | Element | any | string, opt_options?: ReadOptions | undefined): Geometry

- Inherited from ArcGISGeoJSON.readGeometry

  - Defined in node_modules/ol/format/Feature.d.ts:184

  Read a single geometry from a source.

  abstract

  #### Parameters

  - ##### source: Document | Element | any | string

    Source.

  - ##### Optional opt_options: ReadOptions | undefined

    Read options.

  #### Returns Geometry

  Geometry.

### readProjection

- readProjection(source: Document | Element | any | string): Projection

- Inherited from ArcGISGeoJSON.readProjection

  - Defined in node_modules/ol/format/Feature.d.ts:192

  Read the projection from a source.

  abstract

  #### Parameters

  - ##### source: Document | Element | any | string

    Source.

  #### Returns Projection

  Projection.

### writeFeature

- writeFeature(feature: any, opt_options?: WriteOptions | undefined): string

- Inherited from ArcGISGeoJSON.writeFeature

  - Defined in node_modules/ol/format/Feature.d.ts:201

  Encode a feature in this format.

  abstract

  #### Parameters

  - ##### feature: any

    Feature.

  - ##### Optional opt_options: WriteOptions | undefined

    Write options.

  #### Returns string

  Result.

### writeFeatures

- writeFeatures(features: Array<any>, opt_options?: WriteOptions | undefined): string

- Inherited from ArcGISGeoJSON.writeFeatures

  - Defined in node_modules/ol/format/Feature.d.ts:210

  Encode an array of features in this format.

  abstract

  #### Parameters

  - ##### features: Array<any>

    Features.

  - ##### Optional opt_options: WriteOptions | undefined

    Write options.

  #### Returns string

  Result.

### writeGeometry

- writeGeometry(geometry: Geometry, opt_options?: WriteOptions | undefined): string

- Inherited from ArcGISGeoJSON.writeGeometry

  - Defined in node_modules/ol/format/Feature.d.ts:219

  Write a single geometry in this format.

  abstract

  #### Parameters

  - ##### geometry: Geometry

    Geometry.

  - ##### Optional opt_options: WriteOptions | undefined

    Write options.

  #### Returns string

  Result.

Generated using TypeDoc