From 48cc0bed933ae45547ee823a15bbabb58a0049dd Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 5 Jul 2012 18:15:48 +0200 Subject: [PATCH] Add externs for Proj4js --- externs/proj4js.js | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 externs/proj4js.js diff --git a/externs/proj4js.js b/externs/proj4js.js new file mode 100644 index 0000000000..a6fa18768a --- /dev/null +++ b/externs/proj4js.js @@ -0,0 +1,73 @@ +/** + * @externs + * @see http://trac.osgeo.org/proj4js/ + */ + + +/** + * @type {Object} + */ +var Proj4js = {}; + + +/** + * @type {Object.} + */ +Proj4js.defs; + + +/** + * @type {function(string)} + */ +Proj4js.reportError; + + + +/** + * @constructor + * @param {number} x X. + * @param {number} y Y. + */ +Proj4js.Point = function(x, y) {}; + + +/** + * @type {number} + */ +Proj4js.Point.prototype.x; + + +/** + * @type {number} + */ +Proj4js.Point.prototype.y; + + + +/** + * @constructor + * @param {string} srsCode SRS code. + * @param {Function=} callback Callback. + */ +Proj4js.Proj = function(srsCode, callback) {}; + + +/** + * @type {string} + */ +Proj4js.Proj.prototype.title; + + +/** + * @type {string} + */ +Proj4js.Proj.prototype.units; + + +/** + * @param {Proj4js.Proj} source Source projection. + * @param {Proj4js.Proj} dest Destination projection. + * @param {Proj4js.Point|{x:number, y:number}} point Point. + * @return {Proj4js.Point} Point. + */ +Proj4js.transform = function(source, dest, point) {};