Skip to content

Commit

Permalink
Remove detectRetina: true from default tile config, refs #48
Browse files Browse the repository at this point in the history
The OpenStreetMap free tile server does not provide retina tiles, so the labels were unreadably small.
  • Loading branch information
simonw committed Jun 13, 2024
1 parent f11f294 commit 73e2ca4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ You can customize the tile layer used by the maps using the `tile_layer` and `t
}
}
```
If your tile server provides retina tiles, add `"detectRetina": true` to `tile_layer_options` to enable them.

The [Leaflet Providers preview list](https://leaflet-extras.github.io/leaflet-providers/preview/index.html) has details of many other tile layers you can use.

## Custom marker popups
Expand Down
1 change: 0 additions & 1 deletion datasette_cluster_map/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
TILE_LAYER = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
TILE_LAYER_OPTIONS = {
"maxZoom": 19,
"detectRetina": True,
"attribution": '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
}

Expand Down

0 comments on commit 73e2ca4

Please sign in to comment.