diff --git a/main.js b/main.js index 6d01b1eb61..0a232be5e0 100644 --- a/main.js +++ b/main.js @@ -1,11 +1,13 @@ goog.provide('ol'); -goog.require('ol.Map'); +goog.require('ol.map'); goog.require('goog.dom'); ol.main = function() { - goog.dom.getElement('output').innerHTML = 'test'; + goog.dom.getElement('output').innerHTML = 'test'; + var map = ol.map().center([45, 5]); + window.console.log(map.center()); } window['main'] = ol.main; diff --git a/src/ol/hpi/ol/loc.js b/src/api/ol/loc.js similarity index 100% rename from src/ol/hpi/ol/loc.js rename to src/api/ol/loc.js diff --git a/src/ol/hpi/ol/map.js b/src/api/ol/map.js similarity index 93% rename from src/ol/hpi/ol/map.js rename to src/api/ol/map.js index 089bc2d4fa..d392bc3875 100644 --- a/src/ol/hpi/ol/map.js +++ b/src/api/ol/map.js @@ -3,6 +3,7 @@ goog.provide('ol.map'); goog.require('ol.Location'); goog.require('ol.Map'); goog.require('ol.Projection'); +goog.require('ol.loc'); /** @@ -25,7 +26,7 @@ ol.map = function(opt_arg) { if (opt_arg instanceof ol.Map) { return opt_arg; } else if (goog.isObject(opt_arg)) { - config = opt_arg; + var config = opt_arg; if (goog.isDef(config.center)) { center = ol.loc(config.center); } diff --git a/src/ol/hpi/ol/projection.js b/src/api/ol/projection.js similarity index 100% rename from src/ol/hpi/ol/projection.js rename to src/api/ol/projection.js diff --git a/src/ol/epi/ol/location.js b/src/ol/epi/ol/Loc.js similarity index 82% rename from src/ol/epi/ol/location.js rename to src/ol/epi/ol/Loc.js index 31859e5e94..41b95736c5 100644 --- a/src/ol/epi/ol/location.js +++ b/src/ol/epi/ol/Loc.js @@ -8,10 +8,10 @@ goog.require('ol.Projection'); * @constructor * @param {number} x X. * @param {number} y Y. - * @param {number} z Z. - * @param {ol.Projection|undefined} projection Projection. + * @param {number=} opt_z Z. + * @param {ol.Projection=} opt_projection Projection. */ -ol.Location = function(x, y, z, projection) { +ol.Location = function(x, y, opt_z, opt_projection) { /** * @private @@ -27,15 +27,15 @@ ol.Location = function(x, y, z, projection) { /** * @private - * @type {number} + * @type {number|undefined} */ - this.z_ = z; + this.z_ = opt_z; /** * @private * @type {ol.Projection|undefined} */ - this.projection_ = projection; + this.projection_ = opt_projection; }; @@ -65,7 +65,7 @@ ol.Location.prototype.getY = function() { /** - * @return {number} Z. + * @return {number|undefined} Z. */ ol.Location.prototype.getZ = function() { return this.z_; @@ -103,7 +103,7 @@ ol.Location.prototype.setY = function(y) { /** - * @param {number} z Z. + * @param {number|undefined} z Z. * @return {ol.Location} This. */ ol.Location.prototype.setZ = function(z) { diff --git a/src/ol/epi/ol/map.js b/src/ol/epi/ol/map.js index 0f0c32c7d6..ef53c437a8 100644 --- a/src/ol/epi/ol/map.js +++ b/src/ol/epi/ol/map.js @@ -56,7 +56,7 @@ ol.Map.prototype.getZoom = function() { /** - * @param {ol.Center} center Center. + * @param {ol.Location} center Center. * @return {ol.Map} This. */ ol.Map.prototype.setCenter = function(center) { diff --git a/src/ol/epi/ol/projection.js b/src/ol/epi/ol/projection.js index cb77844ae4..b53b7e2266 100644 --- a/src/ol/epi/ol/projection.js +++ b/src/ol/epi/ol/projection.js @@ -9,7 +9,7 @@ ol.Projection = function() { /** * @private - * @type {string=} + * @type {string|undefined} */ this.code_ = undefined; @@ -17,7 +17,7 @@ ol.Projection = function() { /** - * @return {string} Code. + * @return {string|undefined} Code. */ ol.Projection.prototype.getCode = function() { return this.code_; @@ -25,7 +25,7 @@ ol.Projection.prototype.getCode = function() { /** - * @param {string=} code Code. + * @param {string|undefined} code Code. * @return {ol.Projection} This. */ ol.Projection.prototype.setCode = function(code) {