Add tilePixelRatio option to ol.source.XYZ

This commit is contained in:
Petr Pridal
2014-07-06 01:30:05 +02:00
committed by Éric Lemoine
parent aafa578805
commit 1a933febcd
4 changed files with 105 additions and 0 deletions
+11
View File
@@ -4357,6 +4357,7 @@ olx.source.WMTSOptions.prototype.urls;
* maxZoom: (number|undefined),
* minZoom: (number|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* tilePixelRatio: (number|undefined),
* tileUrlFunction: (ol.TileUrlFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.<string>|undefined),
@@ -4422,6 +4423,16 @@ olx.source.XYZOptions.prototype.minZoom;
olx.source.XYZOptions.prototype.tileLoadFunction;
/**
* The pixel ratio used by the tile service. For example, if the tile
* service advertizes 256px by 256px tiles but actually sends 512px
* by 512px images (for retina/hidpi devices) then `tilePixelRatio`
* should be set to `2`. Default is `1`.
* @type {number|undefined}
*/
olx.source.XYZOptions.prototype.tilePixelRatio;
/**
* Optional function to get tile URL given a tile coordinate and the projection.
* Required if url or urls are not provided.