From b96de850446e2a6a392b04e92e88eeb7b89875ca Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Fri, 1 Apr 2016 09:44:18 +0200 Subject: [PATCH] Add cacheSize option to olx.source.CartoDBOptions --- externs/olx.js | 9 +++++++++ src/ol/source/cartodb.js | 1 + 2 files changed, 10 insertions(+) diff --git a/externs/olx.js b/externs/olx.js index 93613fe6d1..30907968f4 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -6211,6 +6211,7 @@ olx.source.XYZOptions.prototype.wrapX; /** * @typedef {{attributions: (olx.source.AttributionOption|undefined), + * cacheSize: (number|undefined), * crossOrigin: (null|string|undefined), * logo: (string|olx.LogoOptions|undefined), * projection: ol.proj.ProjectionLike, @@ -6233,6 +6234,14 @@ olx.source.CartoDBOptions; olx.source.CartoDBOptions.prototype.attributions; +/** + * Cache size. Default is `2048`. + * @type {number|undefined} + * @api + */ +olx.source.CartoDBOptions.prototype.cacheSize; + + /** * The `crossOrigin` attribute for loaded images. Note that you must provide a * `crossOrigin` value if you are using the WebGL renderer or if you want to diff --git a/src/ol/source/cartodb.js b/src/ol/source/cartodb.js index ebf1b77d8f..45f77f70fc 100644 --- a/src/ol/source/cartodb.js +++ b/src/ol/source/cartodb.js @@ -41,6 +41,7 @@ ol.source.CartoDB = function(options) { goog.base(this, { attributions: options.attributions, + cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, logo: options.logo, maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,