Merge pull request #7362 from Alexandre27/master

Added option to the ol.format.GeoJSON to allow the reading of the geometry_name from the geojson
This commit is contained in:
Andreas Hocevar
2017-11-07 22:52:30 +01:00
committed by GitHub
3 changed files with 27 additions and 0 deletions
+5
View File
@@ -118,6 +118,11 @@ GeoJSONFeature.prototype.id;
GeoJSONFeature.prototype.properties;
/**
* @type {string|undefined}
*/
GeoJSONFeature.prototype.geometry_name;
/**
* @constructor
+13
View File
@@ -2002,6 +2002,7 @@ olx.format.WriteOptions.prototype.decimals;
/**
* @typedef {{defaultDataProjection: ol.ProjectionLike,
* geometryName: (string|undefined),
* extractGeometryName: (boolean|undefined),
* featureProjection: ol.ProjectionLike}}
*/
olx.format.GeoJSONOptions;
@@ -2032,6 +2033,18 @@ olx.format.GeoJSONOptions.prototype.featureProjection;
olx.format.GeoJSONOptions.prototype.geometryName;
/**
* Certain GeoJSON providers include the geometry_name field in the feature
* geoJSON. If set to `true` the geoJSON reader will look for that field to
* set the geometry name. If both this field is set to `true` and a
* `geometryName` is provided, the `geometryName` will take precedence.
* Default is `false`.
* @type {boolean|undefined}
* @api
*/
olx.format.GeoJSONOptions.prototype.extractGeometryName;
/**
* @typedef {{geometryName: (string|undefined)}}
*/