Reduce map maxZoom to avoid tiles missing on retina

Due to a problem with Leaflet, the combination of setting maxZoom, maxNativeZoom and detectRetina
causes the map on retina devices to go blank when zooming to max zoom level.
Decreasing max zoom to 18 reduces the ability of users to zoom in, but prevents this issue.
This commit is contained in:
Maciej Ziarkowski 2021-06-16 22:41:01 +01:00 committed by GitHub
parent 937ddcc4d2
commit 8f94c22586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,7 +87,7 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
center={initialMapViewport.position} center={initialMapViewport.position}
zoom={initialMapViewport.zoom} zoom={initialMapViewport.zoom}
minZoom={9} minZoom={9}
maxZoom={19} maxZoom={18}
doubleClickZoom={false} doubleClickZoom={false}
zoomControl={false} zoomControl={false}
attributionControl={false} attributionControl={false}