Skip to main content

toJSON

Converts the geometry to a GeoJSON Feature object.

This method allows the geometry to be serialized to JSON and is automatically called by JSON.stringify().

Returns

GeoJSON_Feature<GeoJSON_Geometry, P>

A GeoJSON Feature representation of this geometry

See also

  • toGeoJSON converts geometry to a GeoJSON Feature or a GeoJSON FeatureCollection object.

Examples