Merge pull request #2063 from Dimitar5555/patch-1

Use preferred tile.openstreetmap.org URL
This commit is contained in:
Yohan Boniface 2024-08-19 12:38:08 +02:00 committed by GitHub
commit 4e770f3ed9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,7 @@ def tilelayers():
TileLayerFactory( TileLayerFactory(
rank=1, rank=1,
name="OpenStreetMap", name="OpenStreetMap",
url_template="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", url_template="https://tile.openstreetmap.org/{z}/{x}/{y}.png",
) )
TileLayerFactory( TileLayerFactory(
rank=2, rank=2,
@ -76,7 +76,7 @@ def test_map_should_display_first_tilelayer_by_default(
page.goto(f"{live_server.url}/map/new") page.goto(f"{live_server.url}/map/new")
tiles = page.locator(".leaflet-tile-pane img") tiles = page.locator(".leaflet-tile-pane img")
expect(tiles.first).to_have_attribute( expect(tiles.first).to_have_attribute(
"src", re.compile(r"https://[abc].tile.openstreetmap.org/\d+/\d+/\d+.png") "src", re.compile(r"https://tile.openstreetmap.org/\d+/\d+/\d+.png")
) )