[OpenLayers-Users] blurry tiles

Toni Hernandez Valles toni.hernandez at udg.edu
Mon May 4 11:31:25 PDT 2020


Helo everyone,

I am using a vector tile from mapbox and I am getting bluring tiles
with no apparent reason. Not for me, at least

I have checked tiles directly to mapbox and the quality is perfect,
but, when using tiles with OpenLayers the map quality gets lower.

In this link (https://mapscloud.udg.edu/blurry_tiles.png) you can see
the quality of the map image (on the left) and the quality of a single
tile. Check the costline and the name "Roses" to see the difference.


I have tried both tile sizes (256 and 512) with the same result.

This is the code for the layer for size 256.

var mapbox =  new TileLayer({
    source: new SourceXYZ({
      url: '
https://api.mapbox.com/styles/v1/mapesbasesigte/ck9olcn8017xc1it6mhv6myje/tiles/256/{z}/{x}/{y}?access_token=mytoken'
,
    })
  })

And the code for the map.

map = new Map({
  layers: [ mapbox ],
  target: 'map',
  view: new View({
    center: [0, 0],
    zoom: 2,
    projection: 'EPSG:3857',
  }),
  controls: defaultControls({attribution:
false}).extend([attribution]),
});

Am I doing something wrong?

Thanks you!!!


More information about the Users mailing list