Small fixes.
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
|
|
||||||
goog.provide('ol');
|
goog.provide('ol');
|
||||||
|
|
||||||
goog.require('ol.Map');
|
goog.require('ol.map');
|
||||||
goog.require('goog.dom');
|
goog.require('goog.dom');
|
||||||
|
|
||||||
ol.main = function() {
|
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;
|
window['main'] = ol.main;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ goog.provide('ol.map');
|
|||||||
goog.require('ol.Location');
|
goog.require('ol.Location');
|
||||||
goog.require('ol.Map');
|
goog.require('ol.Map');
|
||||||
goog.require('ol.Projection');
|
goog.require('ol.Projection');
|
||||||
|
goog.require('ol.loc');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,7 +26,7 @@ ol.map = function(opt_arg) {
|
|||||||
if (opt_arg instanceof ol.Map) {
|
if (opt_arg instanceof ol.Map) {
|
||||||
return opt_arg;
|
return opt_arg;
|
||||||
} else if (goog.isObject(opt_arg)) {
|
} else if (goog.isObject(opt_arg)) {
|
||||||
config = opt_arg;
|
var config = opt_arg;
|
||||||
if (goog.isDef(config.center)) {
|
if (goog.isDef(config.center)) {
|
||||||
center = ol.loc(config.center);
|
center = ol.loc(config.center);
|
||||||
}
|
}
|
||||||
@@ -8,10 +8,10 @@ goog.require('ol.Projection');
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @param {number} x X.
|
* @param {number} x X.
|
||||||
* @param {number} y Y.
|
* @param {number} y Y.
|
||||||
* @param {number} z Z.
|
* @param {number=} opt_z Z.
|
||||||
* @param {ol.Projection|undefined} projection Projection.
|
* @param {ol.Projection=} opt_projection Projection.
|
||||||
*/
|
*/
|
||||||
ol.Location = function(x, y, z, projection) {
|
ol.Location = function(x, y, opt_z, opt_projection) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -27,15 +27,15 @@ ol.Location = function(x, y, z, projection) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {number}
|
* @type {number|undefined}
|
||||||
*/
|
*/
|
||||||
this.z_ = z;
|
this.z_ = opt_z;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.Projection|undefined}
|
* @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() {
|
ol.Location.prototype.getZ = function() {
|
||||||
return this.z_;
|
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.
|
* @return {ol.Location} This.
|
||||||
*/
|
*/
|
||||||
ol.Location.prototype.setZ = function(z) {
|
ol.Location.prototype.setZ = function(z) {
|
||||||
@@ -56,7 +56,7 @@ ol.Map.prototype.getZoom = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.Center} center Center.
|
* @param {ol.Location} center Center.
|
||||||
* @return {ol.Map} This.
|
* @return {ol.Map} This.
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.setCenter = function(center) {
|
ol.Map.prototype.setCenter = function(center) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ ol.Projection = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {string=}
|
* @type {string|undefined}
|
||||||
*/
|
*/
|
||||||
this.code_ = undefined;
|
this.code_ = undefined;
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ ol.Projection = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {string} Code.
|
* @return {string|undefined} Code.
|
||||||
*/
|
*/
|
||||||
ol.Projection.prototype.getCode = function() {
|
ol.Projection.prototype.getCode = function() {
|
||||||
return this.code_;
|
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.
|
* @return {ol.Projection} This.
|
||||||
*/
|
*/
|
||||||
ol.Projection.prototype.setCode = function(code) {
|
ol.Projection.prototype.setCode = function(code) {
|
||||||
|
|||||||
Reference in New Issue
Block a user