{"id":24655,"library":"staticmap","title":"StaticMap","description":"A small, Python-based library for creating static map images with lines and markers. Current version 0.5.7 (last released March 2020). Development appears to be in maintenance mode with no recent releases.","status":"maintenance","version":"0.5.7","language":"python","source_language":"en","source_url":"https://github.com/komoot/staticmap","tags":["mapping","static-map","visualization","geospatial"],"install":[{"cmd":"pip install staticmap","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Image manipulation backend","package":"Pillow","optional":false},{"reason":"Downloading map tiles","package":"requests","optional":false}],"imports":[{"note":"Correct import path","wrong":"","symbol":"StaticMap","correct":"from staticmap import StaticMap"},{"note":"","wrong":"","symbol":"CircleMarker","correct":"from staticmap import CircleMarker"},{"note":"","wrong":"","symbol":"Line","correct":"from staticmap import Line"}],"quickstart":{"code":"from staticmap import StaticMap, CircleMarker, Line\n\nm = StaticMap(600, 400, url_template='https://tile.openstreetmap.org/{z}/{x}/{y}.png')\nmarker = CircleMarker((13.405, 52.52), 'blue', 12)\nm.add_marker(marker)\nline = Line([(13.4, 52.5), (13.41, 52.53)], 'red', 2)\nm.add_line(line)\nimage = m.render()\nimage.save('map.png')","lang":"python","description":"Creates a map with a marker and a line, saved to map.png."},"warnings":[{"fix":"Always pass (longitude, latitude) to StaticMap, CircleMarker, and Line.","message":"Coordinates are (lon, lat) order, not (lat, lon). Many users incorrectly pass (lat, lon) leading to markers in wrong locations.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure network access or pre-download tiles manually.","message":"Tile fetching requires an internet connection. Offline usage is not supported natively.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install staticmap","cause":"Library not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'staticmap'"},{"fix":"Specify a valid url_template: m = StaticMap(600, 400, url_template='https://tile.openstreetmap.org/{z}/{x}/{y}.png')","cause":"Tile URL template is not set or tiles cannot be fetched.","error":"TypeError: argument of type 'NoneType' is not iterable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}