new GeoJSON
- Source:
- geojson.js, line 27
Methods
-
<static> read
-
Parse a GeoJSON string.
Parameters:
Name Type Description str
string GeoJSON string.
- Source:
- geojson.js, line 52
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 obj
ol.geom.Geometry | ol.geom.GeometryCollection | ol.Feature | Array.<ol.Feature> The object to encode.
- Source:
- geojson.js, line 417
Returns:
GeoJSON for the geometry.
- Type
- string
-
read
-
Parse a GeoJSON string.
Parameters:
Name Type Description str
string GeoJSON string.
- Source:
- geojson.js, line 39
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 obj
ol.geom.Geometry | ol.geom.GeometryCollection | ol.Feature | Array.<ol.Feature> The object to encode.
- Source:
- geojson.js, line 429
Returns:
GeoJSON for the geometry.
- Type
- string