Skip to content

GeoJson properties

Vincent Sels edited this page Jan 14, 2016 · 1 revision

Aside from following the GeoJson spec, the GeoJson layer data returned by the REST API must have a couple of properties for this GNaP Map plugin to be able to work with it.

Feature Id

In regular GeoJson, the idproperty of a Feature is optional. In order to work with this plugin, though, this id is required, and must be unique among all features of any type used in the application. This can be achieved by using guids, or by prefixing the a numeric id with the layer type (which must also be unique within the application), e.g.: station-123.

Type property

Every feature must have a type property, which must correspond to the the data layer's itemType.

Polygon center

In case the Feature's geometry is a Polygon, it must have a center property in the desired coordinate system.

Optional properties

  • label: A label, if applicable. Can for example be displayed as text over the feature.
  • info: Additional one-line info, if applicable. Can for instance be displayed in a tooltip when hoovering over the feature.
Clone this wiki locally