komoot / staticmap

A small, python-based library for creating map images with lines, markers and polygons.
https://www.komoot.com
Other
290 stars 65 forks source link

I get "ValueError: images do not match" #25

Open Hinnack opened 4 years ago

Hinnack commented 4 years ago
from staticmap import StaticMap, CircleMarker 
m = StaticMap(800, 600) 
marker = CircleMarker((7.21733093261719, 51.4838951030122), '#0036FF', 12)
m.add_marker(marker)
image = m.render(zoom=14)

python27 staticmap 0.5.4 pillow 6.2.0

Hinnack commented 4 years ago
from staticmap import StaticMap, IconMarker
m = StaticMap(800, 600) 
marker = IconMarker((7.21733093261719, 51.4838951030122), './samples/icon-flag.png', 12, 32)
m.add_marker(marker)
image = m.render(zoom=14)

I only have this problem with certain points...

my fix: Just pass a tuple of 2 to paste

437                 image.paste(tile_image, box[:2], tile_image)