[OpenLayers-Users] blurry tiles

Andreas Hocevar andreas.hocevar at gmail.com
Mon May 4 13:13:32 PDT 2020


By default, OpenLayers applies up- and downscaling to the tiles. To avoid
upscaling, configure the source with

    zDirection: -1

Andreas.

On Mon, May 4, 2020 at 8:47 PM Toni Hernandez Valles <toni.hernandez at udg.edu>
wrote:

> 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!!!
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20200504/8dd489c7/attachment.html>


More information about the Users mailing list