Respect the tile grid's extent

By adding a getTileCoordForTileUrlFuction method like for ol.source.Tile,
we can now properly handle extent and resolution restrictions, and reuse
tiles on wrapped worlds. Also adds the missing wrapX option to
ol.source.TileVector.
This commit is contained in:
Andreas Hocevar
2015-06-15 11:15:25 +02:00
parent e848acd806
commit 2bcb10c973
3 changed files with 93 additions and 7 deletions

View File

@@ -4045,7 +4045,8 @@ olx.source.TileImageOptions.prototype.wrapX;
* tileGrid: ol.tilegrid.TileGrid,
* tileUrlFunction: (ol.TileUrlFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.<string>|undefined)}}
* urls: (Array.<string>|undefined),
* wrapX: (boolean|undefined)}}
* @api
*/
olx.source.TileVectorOptions;
@@ -4108,6 +4109,16 @@ olx.source.TileVectorOptions.prototype.url;
olx.source.TileVectorOptions.prototype.urls;
/**
* Wrap the world horizontally. Default is `true`. For vector editing across the
* -180° and 180° meridians to work properly, this should be set to `false`. The
* resulting geometry coordinates will then exceed the world bounds.
* @type {boolean|undefined}
* @api
*/
olx.source.TileVectorOptions.prototype.wrapX;
/**
* @typedef {{url: (string|undefined),
* displayDpi: (number|undefined),