Plot on an OSM map using Python
I want to plot a circle (and later possible a lot of circles) on a static openstreetmap map.
The library best suited seems
staticmap
from komoot: https://github.com/komoot/staticmap
This code plots a circle on a map of Stuttgart-Vaihingen:
from staticmap import StaticMap, CircleMarker m = StaticMap(200, 200) marker = CircleMarker((9.1065541, 48.7324794), '#0036FF', 5) m.add_marker(marker) image = m.render(zoom=15) image.save('marker.png')
I want to generate quite some images on a large map so I added a cache to the tiles system in staticmap
: https://github.com/mfa/staticmap/commit/4f922e913d6a3976c645e3b7551af441880763a5