ol-mapbox-style icon indicating copy to clipboard operation
ol-mapbox-style copied to clipboard

Change attribution

Open karussell opened this issue 1 year ago • 1 comments

This is just a question, not an issue: how can I change the attribution? I would like to add more into the default list. For raster tiles this is easy:

const tileLayer = new TileLayer({
  source: new XYZ({
    urls: rasterStyle.urls,
    maxZoom: rasterStyle.maxZoom,
    attributions: [rasterStyle.attribution],

I tried a similar approach instead of apply(map, vectorStyle.url) for vector tiles but without success:

const layer = new VectorTileLayer({
  source: new VectorTileSource({
    attributions: '© Test',
    format: new MVT(),
    url: vectorStyle.url,
    tileGrid: createXYZ(),

I also tried an old approach without success.

karussell avatar Sep 25 '23 13:09 karussell