Closed simonw closed 3 years ago
The MBTiles spec doesn't appear to cover this. https://github.com/infostreams/mbtiles-php/issues/15 suggests (back in 2014) that the solution was to have two separate MBTiles files - one containing 256px tiles and one containing 512px retina tiles - and then use the @2x.png
extension to switch between them.
This works fine already. If your MBTiles file contains 512x512 PNG images Leaflet will serve them at 256x256 which means retina devices will display then in high resolution.
I should mention this in the README.
I don't fully understand how this works - something to do with a
@2x.png
extension, e.g. http://c.tile.stamen.com/toner/17/20960/50662@2x.png