Allow ol.proj.Projection units option to be a string
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
* Object literal with config options for the projection.
|
||||
* @typedef {Object} olx.ProjectionOptions
|
||||
* @property {string} code The SRS identifier code, e.g. `EPSG:4326`.
|
||||
* @property {ol.proj.Units} units Units.
|
||||
* @property {ol.proj.Units|string} units Units.
|
||||
* @property {ol.Extent|undefined} extent The validity extent for the SRS.
|
||||
* @property {string|undefined} axisOrientation The axis orientation as
|
||||
* specified in Proj4. The default is `enu`.
|
||||
|
||||
@@ -77,7 +77,7 @@ ol.proj.Projection = function(options) {
|
||||
* @private
|
||||
* @type {ol.proj.Units}
|
||||
*/
|
||||
this.units_ = options.units;
|
||||
this.units_ = /** @type {ol.proj.Units} */ (options.units);
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user