From 1ea65c578c9007bd80793fc324974299c14b9b43 Mon Sep 17 00:00:00 2001 From: Roman Deev Date: Tue, 30 Apr 2024 01:34:53 +0300 Subject: [PATCH] https://a.tile.openstreetmap.org -> https://tile.openstreetmap.org --- README.md | 6 +++--- staticmap/staticmap.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cd87a00..8429a37 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ width | width of the image in pixels height | height of the image in pixels padding_x | (optional) minimum distance in pixel between map features (lines, markers) and map border padding_y | (optional) minimum distance in pixel between map features (lines, markers) and map border -url_template | (optional) the tile server URL for the map base layer, e.g. http://a.tile.osm.org/{z}/{x}/{y}.png +url_template | (optional) the tile server URL for the map base layer, e.g. https://tile.openstreetmap.org/{z}/{x}/{y}.png tile_size | (optional) tile size in pixel, usually 256 #### Add a line: @@ -83,7 +83,7 @@ simplify | whether to simplify coordinates, looks less shaky, default is tr ```python from staticmap import StaticMap, CircleMarker -m = StaticMap(200, 200, url_template='http://a.tile.osm.org/{z}/{x}/{y}.png') +m = StaticMap(200, 200, url_template='https://tile.openstreetmap.org/{z}/{x}/{y}.png') marker_outline = CircleMarker((10, 47), 'white', 18) marker = CircleMarker((10, 47), '#0036FF', 12) @@ -137,4 +137,4 @@ With [papermap](https://github.com/sgraaf/papermap) there is also a spin-off pro ### Licence StaticMap is open source and licensed under Apache License, Version 2.0 -The map samples on this page are made with [OSM](http://www.osm.org) data, © [OpenStreetMap](http://www.openstreetmap.org/copyright) contributors +The map samples on this page are made with [OSM](https://www.osm.org) data, © [OpenStreetMap](https://www.openstreetmap.org/copyright) contributors diff --git a/staticmap/staticmap.py b/staticmap/staticmap.py index 7378ec2..ca3f5a5 100644 --- a/staticmap/staticmap.py +++ b/staticmap/staticmap.py @@ -179,7 +179,7 @@ def _simplify(points, tolerance=11): class StaticMap: - def __init__(self, width, height, padding_x=0, padding_y=0, url_template="https://a.tile.openstreetmap.org/{z}/{x}/{y}.png", tile_size=256, tile_request_timeout=None, headers={"User-Agent": "StaticMap"}, reverse_y=False, background_color="#fff", + def __init__(self, width, height, padding_x=0, padding_y=0, url_template="https://tile.openstreetmap.org/{z}/{x}/{y}.png", tile_size=256, tile_request_timeout=None, headers={"User-Agent": "StaticMap"}, reverse_y=False, background_color="#fff", delay_between_retries=0): """ :param width: map width in pixel