Skip to content

First example in the README not working when using m.render() with zoom >= 20 (it was working until some weeks ago) #35

@gmberton

Description

@gmberton

The first example in the README

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()
image.save('map.png')

does not work when m.render() is called using zoom >= 20.
For example this does not work

m = StaticMap(300, 400, 10)
m.add_line(Line(((13.4, 52.5), (2.3, 48.9)), 'blue', 3))
image = m.render(zoom=20)
image.save('map.png')

but this does work

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions