Skip to content

Commit

Permalink
Merge pull request #13176 from mike-000/datatile-attributions
Browse files Browse the repository at this point in the history
Add `attributions` and `attributionsCollapsible` options to `ol/source/DataTile`
  • Loading branch information
tschaub committed Dec 31, 2021
2 parents bc2969f + b1b0961 commit c500fdc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ol/source/DataTile.js
Expand Up @@ -22,6 +22,8 @@ import {toPromise} from '../functions.js';
* @typedef {Object} Options
* @property {Loader} [loader] Data loader. Called with z, x, and y tile coordinates.
* Returns {@link import("../DataTile.js").Data data} for a tile or a promise for the same.
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
* @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.
* @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.
* @property {number|import("../size.js").Size} [tileSize=[256, 256]] The pixel width and height of the tiles.
Expand Down Expand Up @@ -66,6 +68,8 @@ class DataTileSource extends TileSource {

super({
cacheSize: 0.1, // don't cache on the source
attributions: options.attributions,
attributionsCollapsible: options.attributionsCollapsible,
projection: projection,
tileGrid: tileGrid,
opaque: options.opaque,
Expand Down

0 comments on commit c500fdc

Please sign in to comment.