Make createTileCoordTransform return identity func
This makes ol.tilegrid.TileGrid#createTileCoordTransform return the identity function. This makes it possible to use ol.source.TileVector with an ol.tilegrid.TileGrid (as opposed to an ol.tilegrid.XYZ).
This commit is contained in:
@@ -2,6 +2,7 @@ goog.provide('ol.tilegrid.TileGrid');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.functions');
|
||||
goog.require('ol');
|
||||
goog.require('ol.Coordinate');
|
||||
goog.require('ol.TileCoord');
|
||||
@@ -101,12 +102,16 @@ ol.tilegrid.TileGrid.tmpTileCoord_ = [0, 0, 0];
|
||||
|
||||
|
||||
/**
|
||||
* Returns the identity function. May be overridden in subclasses.
|
||||
* @param {{extent: (ol.Extent|undefined),
|
||||
* wrapX: (boolean|undefined)}=} opt_options Options.
|
||||
* @return {function(ol.TileCoord, ol.proj.Projection, ol.TileCoord=):
|
||||
* ol.TileCoord} Tile coordinate transform.
|
||||
*/
|
||||
ol.tilegrid.TileGrid.prototype.createTileCoordTransform = goog.abstractMethod;
|
||||
ol.tilegrid.TileGrid.prototype.createTileCoordTransform =
|
||||
function(opt_options) {
|
||||
return goog.functions.identity;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user