Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use preferred tile.openstreetmap.org URL #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. <code>http://a.tile.osm.org/{z}/{x}/{y}.png</code>
url_template | (optional) the tile server URL for the map base layer, e.g. <code>https://tile.openstreetmap.org/{z}/{x}/{y}.png</code>
tile_size | (optional) tile size in pixel, usually 256

#### Add a line:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion staticmap/staticmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down