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 GeoJSONFeature
or a GeoJSONFeatureCollection
object.