GeoJSONGeometry.fromJSON constructor

GeoJSONGeometry.fromJSON(
  1. String source
)

Creates a new instance of GeoJSONGeometry from a JSON string.

The JSON string must represent a Map containing a 'type' key with one of the valid GeoJSON Geometry types.

Implementation

factory GeoJSONGeometry.fromJSON(String source) =>
    GeoJSONGeometry.fromMap(json.decode(source));