How to draw a png-osm-map with coordinates
gis, matplotlib, openstreetmap, python
Solution
This not my solution; I have pasted it from the question because the asker doesn't have enough reputation to answer his own question.
I found a solution:
Using `imshow` within Basemap includes an png into the plot as background image. To obtain the right background image, I used the export feature of OSM with boundaries taken from the Basemap constructor:
m = Basemap(llcrnrlon=7.4319, urcrnrlat=52.0632, urcrnrlon=7.848, llcrnrlat=51.8495,
resolution='h', projection='merc')
im = plt.imread('background.png')
m.imshow(im, interpolation='lanczos', origin='upper')
Problem
I want to create a map with several given points in Python. For this I want to use Basemap from matplotlib. It works well, but I don't know how to get a proper background map. How can I import an OSM map? Or should I use a different mapping package? I just want to create a raster map and save it as png.