You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from staticmap import StaticMap, Line
m = StaticMap(300, 400, 10)
m.add_line(Line(((13.4, 52.5), (2.3, 48.9)), 'blue', 3))
image = m.render(zoom=19)
image.save('map.png')
When using zoom >= 20 an error is shown saying request failed [400]: https://a.tile.openstreetmap.org/20/547152/352422.png although it was working until a few weeks ago.
Is the issue related to issue 33? Is there any workaround to this issue?
The text was updated successfully, but these errors were encountered:
map_builder doesn't work anymore, so I want to raise an issue here.
(The reason may be here: [https://operations.osmfoundation.org/policies/tiles/])
After seeing your issue, I tried to use other methods to implement it.
Here is the code and a demo, I hope it can help you.
(I am using the demo generated by the sf_xl_small data set, so the points in the graph are sparser than those in your paper.)
grouped_gps_coords = _get_coordinates_from_dataset(join(dataset_folder, "images"))
center, bounds = get_center_and_bounds([coords for _, coords in grouped_gps_coords])
m = folium.Map(location=center, zoom_start=13) # Set center based on the mean of all coords
m.fit_bounds(bounds) # Adjust zoom to fit the bounds
COLOR_MAP = {
"test - database": "#0000FF", # Red
"test - queries_queries_night": "#FF0000" # Blue
}
for folder_name, coords in grouped_gps_coords:
print(folder_name)
color = COLOR_MAP.get(folder_name, "#FF0000")
m = add_points_to_map(m, coords, color)
m.save(os.path.join(dataset_folder, "map.html"))
Hi @BinuxLiu thank you for your help!
This workaround is very interesting: it would still be better to download the images as PNG, but according to the link you shared it seems like there is not hope to do that through OSM (and therefore komoot).
If you want you could do a PR on https://github.com/gmberton/VPR-datasets-downloader , if not I'll work on it after the CVPR deadline.
Thanks again!
The first example in the README
does not work when
m.render()
is called using zoom >= 20.For example this does not work
but this does work
When using zoom >= 20 an error is shown saying
request failed [400]: https://a.tile.openstreetmap.org/20/547152/352422.png
although it was working until a few weeks ago.Is the issue related to issue 33? Is there any workaround to this issue?
The text was updated successfully, but these errors were encountered: