Abstract
Geometry coordinates
Optional
properties: object = {}Feature properties
Raw geometry coordinates for this feature.
The geometry type (set by subclass).
Object of key/value properties.
Abstract method: Format coordinates for GeoJSON output as string. Implemented by subclasses.
Convert to a GeoJSON Feature as a string. Numbers in properties are formatted to two decimals.
Static
replacerJSON.stringify replacer function that rounds all numbers to two decimals.
Abstract base class for a GeoJSON Feature. Subclasses implement geometry type and coordinate formatting.
Handles number formatting (two decimals) for properties and provides a custom string (JSON) representation.
Param: coordinates
Geometry coordinates for the feature.
Param: properties
Properties for the feature.
Example