Return transformed tile coordinates from ol.TileGrid's API methods

This commit is contained in:
Andreas Hocevar
2015-06-12 09:47:32 +02:00
parent acab0ebd57
commit 4b3aac32c3
6 changed files with 45 additions and 6 deletions

View File

@@ -82,7 +82,7 @@ ol.source.TileUTFGrid.prototype.getTemplate = function() {
ol.source.TileUTFGrid.prototype.forDataAtCoordinateAndResolution = function(
coordinate, resolution, callback, opt_this, opt_request) {
if (!goog.isNull(this.tileGrid)) {
var tileCoord = this.tileGrid.getTileCoordForCoordAndResolution(
var tileCoord = this.tileGrid.getTileCoordForCoordAndResolutionInternal(
coordinate, resolution);
var tile = /** @type {!ol.source.TileUTFGridTile_} */(this.getTile(
tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));

View File

@@ -114,7 +114,7 @@ ol.source.TileVector.prototype.forEachFeatureAtCoordinateAndResolution =
var tileGrid = this.tileGrid_;
var tiles = this.tiles_;
var tileCoord = tileGrid.getTileCoordForCoordAndResolution(coordinate,
var tileCoord = tileGrid.getTileCoordForCoordAndResolutionInternal(coordinate,
resolution);
var tileKey = this.getTileKeyZXY_(tileCoord[0], tileCoord[1], tileCoord[2]);

View File

@@ -140,7 +140,7 @@ ol.source.TileWMS.prototype.getGetFeatureInfoUrl =
tileGrid = this.getTileGridForProjection(projectionObj);
}
var tileCoord = tileGrid.getTileCoordForCoordAndResolution(
var tileCoord = tileGrid.getTileCoordForCoordAndResolutionInternal(
coordinate, resolution);
if (tileGrid.getResolutions().length <= tileCoord[0]) {