Pass transformed tile coordinates to the tileUrlFunction

This commit is contained in:
Andreas Hocevar
2015-06-12 09:45:03 +02:00
parent fad3cf9672
commit 6a4d1c9b89
21 changed files with 189 additions and 350 deletions

View File

@@ -3,7 +3,6 @@ goog.provide('ol.source.TileVector');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.object');
goog.require('ol.TileCoord');
goog.require('ol.TileUrlFunction');
goog.require('ol.featureloader');
goog.require('ol.source.State');
@@ -52,12 +51,6 @@ ol.source.TileVector = function(options) {
*/
this.tileUrlFunction_ = ol.TileUrlFunction.nullTileUrlFunction;
/**
* @private
* @type {ol.TileCoordTransformType}
*/
this.tileCoordTransform_ = this.tileGrid_.createTileCoordTransform();
/**
* @private
* @type {Object.<string, Array.<ol.Feature>>}
@@ -254,7 +247,6 @@ ol.source.TileVector.prototype.getTileKeyZXY_ = function(z, x, y) {
*/
ol.source.TileVector.prototype.loadFeatures =
function(extent, resolution, projection) {
var tileCoordTransform = this.tileCoordTransform_;
var tileGrid = this.tileGrid_;
var tileUrlFunction = this.tileUrlFunction_;
var tiles = this.tiles_;
@@ -278,7 +270,7 @@ ol.source.TileVector.prototype.loadFeatures =
tileCoord[0] = z;
tileCoord[1] = x;
tileCoord[2] = y;
tileCoordTransform(tileCoord, projection, tileCoord);
tileGrid.transformTileCoord(tileCoord, tileCoord);
var url = tileUrlFunction(tileCoord, 1, projection);
if (goog.isDef(url)) {
tiles[tileKey] = [];