Add tileLoadFunction option to ol.source.XYZ

This commit is contained in:
Tom Payne
2013-09-18 13:40:07 +01:00
parent 6896e920f9
commit f3d5a5c37b
2 changed files with 3 additions and 0 deletions

View File

@@ -616,6 +616,8 @@
* @property {number|undefined} maxZoom Optional max zoom level. The default is * @property {number|undefined} maxZoom Optional max zoom level. The default is
* 18. * 18.
* @property {number|undefined} minZoom Unsupported (TODO: remove this). * @property {number|undefined} minZoom Unsupported (TODO: remove this).
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional
* function to load a tile given a URL.
* @property {ol.TileUrlFunctionType|undefined} tileUrlFunction Optional * @property {ol.TileUrlFunctionType|undefined} tileUrlFunction Optional
* function to get tile URL given a tile coordinate and the projection. * function to get tile URL given a tile coordinate and the projection.
* Required if url or urls are not provided. * Required if url or urls are not provided.

View File

@@ -31,6 +31,7 @@ ol.source.XYZ = function(options) {
logo: options.logo, logo: options.logo,
projection: projection, projection: projection,
tileGrid: tileGrid, tileGrid: tileGrid,
tileLoadFunction: options.tileLoadFunction,
tileUrlFunction: ol.TileUrlFunction.nullTileUrlFunction tileUrlFunction: ol.TileUrlFunction.nullTileUrlFunction
}); });