Merge pull request #3178 from fredj/geojson-externs
GeoJSON externs fixes
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
var GeoJSONObject = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {!Array.<number>|undefined}
|
||||
*/
|
||||
GeoJSONObject.prototype.bbox;
|
||||
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
@@ -28,11 +34,17 @@ GeoJSONObject.prototype.crs;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {GeoJSONObject}
|
||||
*/
|
||||
var GeoJSONCRS = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* CRS type. One of `link` or `name`.
|
||||
* @type {string}
|
||||
*/
|
||||
GeoJSONCRS.prototype.type;
|
||||
|
||||
|
||||
/**
|
||||
* TODO: remove GeoJSONCRSCode when http://jira.codehaus.org/browse/GEOS-5996
|
||||
* is fixed and widely deployed.
|
||||
@@ -110,12 +122,6 @@ GeoJSONGeometryCollection.prototype.geometries;
|
||||
var GeoJSONFeature = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {!Array.<number>|undefined}
|
||||
*/
|
||||
GeoJSONFeature.prototype.bbox;
|
||||
|
||||
|
||||
/**
|
||||
* @type {GeoJSONGeometry}
|
||||
*/
|
||||
@@ -148,16 +154,9 @@ var GeoJSONFeatureCollection = function() {};
|
||||
GeoJSONFeatureCollection.prototype.features;
|
||||
|
||||
|
||||
/**
|
||||
* @type {!Array.<number>|undefined}
|
||||
*/
|
||||
GeoJSONFeatureCollection.prototype.bbox;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {GeoJSONObject}
|
||||
*/
|
||||
var GeoJSONLink = function() {};
|
||||
|
||||
@@ -166,3 +165,8 @@ var GeoJSONLink = function() {};
|
||||
* @type {string}
|
||||
*/
|
||||
GeoJSONLink.prototype.href;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
GeoJSONLink.prototype.type;
|
||||
|
||||
@@ -3602,7 +3602,7 @@ olx.source.FormatVectorOptions.prototype.projection;
|
||||
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
|
||||
* defaultProjection: ol.proj.ProjectionLike,
|
||||
* logo: (string|olx.LogoOptions|undefined),
|
||||
* object: (GeoJSONObject|undefined),
|
||||
* object: (GeoJSONFeature|GeoJSONFeatureCollection|undefined),
|
||||
* projection: ol.proj.ProjectionLike,
|
||||
* text: (string|undefined),
|
||||
* url: (string|undefined),
|
||||
@@ -3637,8 +3637,8 @@ olx.source.GeoJSONOptions.prototype.logo;
|
||||
|
||||
|
||||
/**
|
||||
* Object.
|
||||
* @type {GeoJSONObject|undefined}
|
||||
* GeoJSON feature or feature collection.
|
||||
* @type {GeoJSONFeature|GeoJSONFeatureCollection|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.source.GeoJSONOptions.prototype.object;
|
||||
|
||||
@@ -64,7 +64,7 @@ ol.format.GeoJSON.EXTENSIONS_ = ['.geojson'];
|
||||
|
||||
|
||||
/**
|
||||
* @param {GeoJSONObject} object Object.
|
||||
* @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.
|
||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
||||
* @private
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
@@ -92,7 +92,7 @@ ol.format.GeoJSON.readGeometryCollectionGeometry_ = function(
|
||||
goog.asserts.assert(object.type == 'GeometryCollection');
|
||||
var geometries = goog.array.map(object.geometries,
|
||||
/**
|
||||
* @param {GeoJSONObject} geometry Geometry.
|
||||
* @param {GeoJSONGeometry} geometry Geometry.
|
||||
* @return {ol.geom.Geometry} geometry Geometry.
|
||||
*/
|
||||
function(geometry) {
|
||||
|
||||
Reference in New Issue
Block a user