Skip to content

Commit

Permalink
fix of #4
Browse files Browse the repository at this point in the history
  • Loading branch information
wp99cp committed Aug 18, 2021
1 parent 8a194ac commit 2e839ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python_program/create_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ def plot_route_on_map(raw_gpx_data: gpxpy.gpx,

print('URL of a sample tile: ' + urls[0])

# Request images in parallel
rs = (grequests.get(u) for u in urls)
results = grequests.map(rs)

# Since swisstopo services are free, we must guarantee to use the service fairly
# See https://www.geo.admin.ch/de/geo-dienstleistungen/geodienste/terms-of-use.html
if len(urls) > 300:
raise Exception('Fair use limit exceeded!')

# Request images in parallel
rs = (grequests.get(u) for u in urls)
results = grequests.map(rs)

index = 0
for i in range(0, x_count):
for j in range(1, y_count + 1):
Expand Down

0 comments on commit 2e839ee

Please sign in to comment.