Move olx.source.CartoDBOptions to ol/source/CartoDBOptions

This commit is contained in:
Florent gravin
2018-03-28 14:48:00 +02:00
parent af4296d2bc
commit 27f86babec
2 changed files with 26 additions and 107 deletions

View File

@@ -6,13 +6,38 @@ import {assign} from '../obj.js';
import SourceState from '../source/State.js';
import XYZ from '../source/XYZ.js';
/**
* @typedef {Object} Options
* @property {ol.AttributionLike} [attributions] Attributions.
* @property {number} [cacheSize=2048] Cache size.
* @property {null|string} [crossOrigin] 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
* access pixel data with the Canvas renderer. See
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.
* @property {ol.ProjectionLike} [projection='EPSG:3857'] Projection.
* @property {number} [maxZoom=18] Max zoom.
* @property {number} [minZoom] Minimum zoom.
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
* @property {Object} [config] If using anonymous maps, the CartoDB config to use. See
* {@link http://docs.cartodb.com/cartodb-platform/maps-api/anonymous-maps/}
* for more detail.
* If using named maps, a key-value lookup with the template parameters.
* See {@link http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/}
* for more detail.
* @property {string} [map] If using named maps, this will be the name of the template to load.
* See {@link http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/}
* for more detail.
* @property {string} account If using named maps, this will be the name of the template to load.
*/
/**
* @classdesc
* Layer source for the CartoDB Maps API.
*
* @constructor
* @extends {ol.source.XYZ}
* @param {olx.source.CartoDBOptions} options CartoDB options.
* @param {module:ol/source/CartoDB~Options=} options CartoDB options.
* @api
*/
const CartoDB = function(options) {