diff --git a/CHANGES b/CHANGES index 0492239d..aee66994 100644 --- a/CHANGES +++ b/CHANGES @@ -5,7 +5,7 @@ CHANGELOG 0.30.1 (unreleased) ------------------- -- +- Change OSM tile link to unified format #375 0.30.0 (2024-05-13) ------------------- diff --git a/docs/templates.rst b/docs/templates.rst index 52601396..9a11247d 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -142,7 +142,7 @@ Default tiles layer To globally add a tiles layer to your maps:: - 'TILES': 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' + 'TILES': 'http://tile.openstreetmap.org/{z}/{x}/{y}.png' This setting can also be a list of tuples ``(name, url, options)``. The python dict ``options`` accepts all the Leaflet tileLayers options. diff --git a/leaflet/__init__.py b/leaflet/__init__.py index 27d0d2f8..87e517cf 100644 --- a/leaflet/__init__.py +++ b/leaflet/__init__.py @@ -8,7 +8,7 @@ from django.utils.translation import gettext_lazy as _ from django.utils.functional import lazy, Promise -DEFAULT_TILES = [(_('OSM'), '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', +DEFAULT_TILES = [(_('OSM'), '//tile.openstreetmap.org/{z}/{x}/{y}.png', '© OpenStreetMap contributors')] LEAFLET_CONFIG = getattr(settings, 'LEAFLET_CONFIG', {}) diff --git a/leaflet/tests/tests.py b/leaflet/tests/tests.py index 82d294e5..c231942a 100644 --- a/leaflet/tests/tests.py +++ b/leaflet/tests/tests.py @@ -69,7 +69,7 @@ class TemplateTagTest(SimpleTestCase): def test_default_layer_in_leaflet_map(self): context = leaflet_tags.leaflet_map('map') self.assertEqual('map', context['name']) - self.assertTrue('"OSM", "//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"' in + self.assertTrue('"OSM", "//tile.openstreetmap.org/{z}/{x}/{y}.png"' in context['djoptions'])