From 025547d1996d69bb9f714090dc94e85be044efbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 20 Jun 2012 17:43:10 +0200 Subject: [PATCH 1/2] [ol.Layer.XYZ] minor changes in code comments --- src/ol/layer/XYZ.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ol/layer/XYZ.js b/src/ol/layer/XYZ.js index fb44ff361c..3d0191e7e0 100644 --- a/src/ol/layer/XYZ.js +++ b/src/ol/layer/XYZ.js @@ -8,7 +8,7 @@ goog.require('ol.TileSet'); * Class for XYZ layers. * @constructor * @param {string} url URL template. E.g. - * http://a.tile.openstreetmap.org/${z}/${x}/${y}.png. + * http://a.tile.openstreetmap.org/{z}/{x}/{y}.png. */ ol.layer.XYZ = function(url) { @@ -111,6 +111,7 @@ ol.layer.XYZ.prototype.getData = function(bounds, resolution) { zoom = me.zoomForResolution(resolution); resolution = me.resolutions_[zoom]; + // define some values used for the actual tiling var boundsMinX = bounds.getMinX(), boundsMaxX = bounds.getMaxX(), boundsMinY = bounds.getMinY(), @@ -133,6 +134,7 @@ ol.layer.XYZ.prototype.getData = function(bounds, resolution) { gridLeft = tileOriginX + tileWidthGeo * offsetX, gridTop = tileOriginY - tileHeightGeo * offsetY; + // now tile var tiles = [], tile, url, From 1ac40021bb7f1a32fc959f4f392b3c982d4472de Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 20 Jun 2012 17:43:35 +0200 Subject: [PATCH 2/2] Quoting properties for external use. --- src/ol/Loc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ol/Loc.js b/src/ol/Loc.js index c3d4505038..f2b0e44190 100644 --- a/src/ol/Loc.js +++ b/src/ol/Loc.js @@ -117,7 +117,7 @@ ol.Loc.prototype.transform = function(proj) { if (goog.isString(proj)) { proj = new ol.Projection(proj); } - return this.transform_(proj); + return this._transform(proj); }; /** @@ -126,8 +126,8 @@ ol.Loc.prototype.transform = function(proj) { * @param {!ol.Projection} proj The destination projection. * @returns {!ol.Loc} */ -ol.Loc.prototype.transform_ = function(proj) { - var point = {x: this.x_, y: this.y_}; +ol.Loc.prototype._transform = function(proj) { + var point = {'x': this.x_, 'y': this.y_}; var sourceProj = this.projection_; if (!goog.isDefAndNotNull(sourceProj)) { throw new Error("Cannot transform a location without a source projection.");