[Feature] High DPI support
There are no high-DPI tiles from the OpenStreetMaps Foundation and there won't be in the foreseeable future.
We can have a checkbox in the layers panel with "High-DPI mode" for high-DPI fans who prefer a crisp map over larger street names, by using tiles at half their size. It is not ideal with the small names, but neither is a low-DPI map on a high-DPI screen.
The toggle should toggle tileSize
and zoomOffset
. E.g.:
tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
tileSize: 128,
zoomOffset: 1
})
Quick Fiddle (Obviously you'll need a High-DPI screen to appreciate the difference.)
Edited by Redsandro