diff --git a/externs/geojson.js b/externs/geojson.js new file mode 100644 index 0000000000..68a6bc0178 --- /dev/null +++ b/externs/geojson.js @@ -0,0 +1,105 @@ +/** + * @fileoverview Externs for GeoJSON. + * @see http://geojson.org/geojson-spec.html + * @externs + */ + + + +/** + * @constructor + */ +var GeoJSONCRS = function() {}; + + +/** + * @type {string} + */ +GeoJSONCRS.prototype.type; + + +/** + * @type {!Object.} + */ +GeoJSONCRS.prototype.properties; + + + +/** + * @constructor + */ +var GeoJSONGeometry = function() {}; + + +/** + * @type {string} + */ +GeoJSONGeometry.prototype.type; + + +/** + * @type {!Array.|!Array.>} + */ +GeoJSONGeometry.prototype.coordinates; + + + +/** + * @constructor + */ +var GeoJSONFeature = function() {}; + + +/** + * @type {string} + */ +GeoJSONFeature.prototype.type; + + +/** + * @type {GeoJSONGeometry} + */ +GeoJSONFeature.prototype.geometry; + + +/** + * @type {Object.} + */ +GeoJSONFeature.prototype.properties; + + + +/** + * @constructor + */ +var GeoJSONFeatureCollection = function() {}; + + +/** + * @type {string} + */ +GeoJSONFeatureCollection.prototype.type; + + +/** + * @type {!Array.} + */ +GeoJSONFeatureCollection.prototype.features; + + +/** + * @type {!Array.|undefined} + */ +GeoJSONFeatureCollection.prototype.bbox; + + +/** + * @type {!GeoJSONCRS|undefined} + */ +GeoJSONFeatureCollection.prototype.crs; + + +/** + * @type {!Object.} + */ +GeoJSONFeatureCollection.prototype.properties; diff --git a/main.json b/main.json index 16f03d34e8..6177730616 100644 --- a/main.json +++ b/main.json @@ -11,6 +11,10 @@ "goog.DEBUG": false }, + "externs": [ + "externs/geojson.js" + ], + "mode": "ADVANCED", "level": "VERBOSE", "pretty-print": true,