Class: POIJSON

alk.format.POIJSON

An instance of this class provides a format for reading and writing data in the ALK JSON format. See pcmws.poi.POIObject.

new alk.format.POIJSON(opt_options)

This constructor creates a Format object with which to parse and decode ALK POI data.

Features with Point geometries are generated based on the data and are given FeatureIds ol.Feature#getId based on the string of each object. With this id, the vector source will not add new features with the same id, thereby eliminating duplicates.

If the optional HashedIdFactory is not replaced, a FnVA32 hash algorithm creates the feature Id based on the entire stringified version of the JSON object for each POI. The chances for collision is 1:2^32.

If a strict adherence to uniqueness is absolutely needed, the idFactory may be replaced with the options.idFactory.

Option Type Description
idFactory alk.format.HashedIdFactory | undefined

This option allows the replacement of the default hashed id factory used by this format. The default is alk.format.HashedIdFactory without hash collision checking.

defaultDataProjection alk.val.SRS | undefined

Default data projection. Default is EPSG:4326.

featureProjection alk.val.SRS | undefined

Projection for features read or written by the format. Options passed to read or write methods will take precedence.

Extends