Added option to the ol.format.GeoJSON to allow the reading of the geometry_name from the geojson.

This commit is contained in:
Alexandre Silva
2017-10-16 14:51:55 +01:00
parent 382c6b9832
commit 011285aefe
3 changed files with 26 additions and 0 deletions

View File

@@ -140,6 +140,11 @@ GeoJSONFeature.prototype.id;
GeoJSONFeature.prototype.properties;
/**
* @type {string|undefined}
*/
GeoJSONFeature.prototype.geometry_name;
/**
* @constructor

View File

@@ -1994,6 +1994,7 @@ olx.format.WriteOptions.prototype.decimals;
/**
* @typedef {{defaultDataProjection: ol.ProjectionLike,
* geometryName: (string|undefined),
* readGeometryNameFromGeoJSON: (boolean|undefined),
* featureProjection: ol.ProjectionLike}}
*/
olx.format.GeoJSONOptions;
@@ -2024,6 +2025,17 @@ 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.
* @type {boolean|undefined}
* @api
*/
olx.format.GeoJSONOptions.prototype.readGeometryNameFromGeoJSON;
/**
* @typedef {{geometryName: (string|undefined)}}
*/