new GeoJSON
Stability: experimental
Provide access to features stored in the GeoJSON format.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
options |
olx.format.GeoJSONOptions |
<optional> |
Options. |
- Source:
- geojsonformat.js, line 31
Extends
- ol.format.JSONFeature
Methods
-
readFeature
Stability: not documented -
Read a feature from a GeoJSON Feature source. This method will throw an error if used with a FeatureCollection source.
Parameters:
Name Type Description sourceArrayBuffer | Document | Node | Object | string Source.
- Source:
- geojsonformat.js, line 326
Returns:
Feature.
- Type
- ol.Feature
-
readFeatures
Stability: not documented -
Read all features from a GeoJSON source. Works with both Feature and FeatureCollection sources.
Parameters:
Name Type Description sourceArrayBuffer | Document | Node | Object | string Source.
- Source:
- geojsonformat.js, line 337
Returns:
Features.
- Type
- Array.<ol.Feature>
-
readGeometry
Stability: not documented -
Read a geometry from a GeoJSON source.
Parameters:
Name Type Description sourceArrayBuffer | Document | Node | Object | string Source.
- Source:
- geojsonformat.js, line 390
Returns:
Geometry.
- Type
- ol.geom.Geometry
-
readProjection
Stability: not documented -
Read the projection from the GeoJSON source file.
Parameters:
Name Type Description objectArrayBuffer | Document | Node | Object | string Source.
- Source:
- geojsonformat.js, line 408
Returns:
Projection.
- Type
- ol.proj.Projection
-
writeFeature
Stability: not documented -
Encode a feature as a GeoJSON Feature object.
Parameters:
Name Type Description featureol.Feature Feature.
- Source:
- geojsonformat.js, line 437
Returns:
Result.
- Type
- ArrayBuffer | Node | Object | string
-
writeFeatures
Stability: not documented -
Encode an array of features as GeoJSON.
Parameters:
Name Type Description featuresArray.<ol.Feature> Features.
- Source:
- geojsonformat.js, line 472
Returns:
Result.
- Type
- ArrayBuffer | Node | Object | string
OpenLayers 3