diff --git a/externs/olx.js b/externs/olx.js index 6fc1c709ef..e909141fb5 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -6155,6 +6155,9 @@ olx.source.TileJSONOptions.prototype.wrapX; * gutter: (number|undefined), * hidpi: (boolean|undefined), * logo: (string|olx.LogoOptions|undefined), + * tileClass: (function(new: ol.ImageTile, ol.TileCoord, + * ol.TileState, string, ?string, + * ol.TileLoadFunctionType)|undefined), * tileGrid: (ol.tilegrid.TileGrid|undefined), * projection: ol.ProjectionLike, * reprojectionErrorThreshold: (number|undefined), @@ -6237,6 +6240,16 @@ olx.source.TileWMSOptions.prototype.hidpi; olx.source.TileWMSOptions.prototype.logo; +/** + * Class used to instantiate image tiles. Default is {@link ol.ImageTile}. + * @type {function(new: ol.ImageTile, ol.TileCoord, + * ol.TileState, string, ?string, + * ol.TileLoadFunctionType)|undefined} + * @api + */ +olx.source.TileWMSOptions.prototype.tileClass; + + /** * Tile grid. Base this on the resolutions, tilesize and extent supported by the * server. diff --git a/src/ol/source/tilewms.js b/src/ol/source/tilewms.js index 8d70b67e95..29fc1aa751 100644 --- a/src/ol/source/tilewms.js +++ b/src/ol/source/tilewms.js @@ -42,6 +42,7 @@ ol.source.TileWMS = function(opt_options) { opaque: !transparent, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, + tileClass: options.tileClass, tileGrid: options.tileGrid, tileLoadFunction: options.tileLoadFunction, url: options.url,