[mapserver-users] Mapcache - Howto provide additional high DPI tileset?

Michael Schulz mandschulz at googlemail.com
Wed Jan 25 00:26:24 PST 2017


Hi Thomas,

thanks for your help, that does it. Great!

@Robert, atm I'm using leaflet and this provides boolean L.Browser.retina
property that can be used to check whether the client has a higher pixel
ratio. It also has a detectRetina option for the tileLayer, but since we
need to switch tile/gridsets I'm not sure whether this can be used. I'm
sure other clients will have something similar.

Cheers, Michael


2017-01-24 20:00 GMT+01:00 Robert Sanson <Robert.Sanson at asurequality.com>:

> So we would need to prepare two complete tile sets.
>
>
>
> Is there then a way in the Javascript code to switch the WMTS call from
> the 256x256 grid to the 512x512 grid if the client browser has a Retina
> display?
>
>
>
> Thanks,
>
> Robert
>
>
>
> *From:* mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] *On
> Behalf Of *thomas bonfort
> *Sent:* Wednesday, 25 January 2017 4:49 a.m.
> *To:* Michael Schulz <mandschulz at googlemail.com>;
> mapserver-users at lists.osgeo.org
> *Subject:* Re: [mapserver-users] Mapcache - Howto provide additional high
> DPI tileset?
>
>
>
> Should be doable, just define a new grid for it:
>
>
>
> <grid name="g">
>  <extent>-20037508.3427892480,-20037508.3427892480,20037508.
> 3427892480,20037508.3427892480</extent>
> <srs>EPSG:3857</srs>
> <size>512 512</size>
>
> <!-- level 0 of the original google grid is removed 156543.0339280410 -->
> <resolutions>
> 78271.51696402048
> 39135.75848201023
> 19567.87924100512
> 9783.939620502561
> 4891.969810251280
> 2445.984905125640
> 1222.992452562820
> 611.4962262814100
> 305.7481131407048
> 152.8740565703525
> 76.43702828517624
> 38.21851414258813
> 19.10925707129406
> 9.554628535647032
> 4.777314267823516
> 2.388657133911758
> 1.194328566955879
> 0.5971642834779395
> 0.29858214173896975
>
> </resolutions>
> <!--.29858214173896975 is added-->
> </grid>
>
>
>
> --
>
> thomas
>
>
>
> On Tue, Jan 24, 2017 at 4:09 PM Michael Schulz <mandschulz at googlemail.com>
> wrote:
>
> Dear MapCachers,
>
> I would like to know if anybody had success in using mapcache to provide
> tiles for usage on retina displays? There seems not to be the one default
> strategy to do so, but IIUC the baseline is to provide a bigger tile
> (512x512 instead of 256x256) for the some extent.
>
> Now the question is, how to generate with mapcache an additional cache
> with big tiles (512) but can be accessed using identical tile requests? By
> identical, I mean that the xyz numbers stay the same, but a different
> tileset name is used (e.g. basemaps.at does that) or using MapBox's "@2x"
> modifier.
>
> Any ideas or solutions?
>
> Thanks, Michael
>
>
>
>
> --
>
> -----------------------------------------------------------
> Michael Schulz
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


-- 
-----------------------------------------------------------
Michael Schulz

Johann-Sebastian-Bach-Str. 32
79104 Freiburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170125/e992b41c/attachment.htm>


More information about the MapServer-users mailing list