new GeoJSON
Read and write GeoJSON
- Source:
- geojson.js, line 30
Methods
-
<static> read
-
Parse a GeoJSON string.
Parameters:
Name Type Description strstring GeoJSON string.
- Source:
- geojson.js, line 55
Returns:
Parsed geometry or array of geometries.
- Type
- ol.Feature | Array.<ol.Feature> | ol.geom.Geometry | Array.<ol.geom.Geometry>
-
<static> write
-
Write out a geometry, geometry collection, feature or an array of features as a GeoJSON string.
Parameters:
Name Type Description objol.geom.Geometry | ol.geom.GeometryCollection | ol.Feature | Array.<ol.Feature> The object to encode.
- Source:
- geojson.js, line 426
Returns:
GeoJSON for the geometry.
- Type
- string
-
read
-
Parse a GeoJSON string.
Parameters:
Name Type Description strstring GeoJSON string.
- Source:
- geojson.js, line 42
Returns:
Parsed geometry or array of geometries.
- Type
- ol.Feature | Array.<ol.Feature> | ol.geom.Geometry | Array.<ol.geom.Geometry>
-
write
-
Write out a geometry, geometry collection, feature or an array of features as a GeoJSON string.
Parameters:
Name Type Description objol.geom.Geometry | ol.geom.GeometryCollection | ol.Feature | Array.<ol.Feature> The object to encode.
- Source:
- geojson.js, line 438
Returns:
GeoJSON for the geometry.
- Type
- string