--- id: staticmap version: "0.5.7" license: unclear license_treatment: unclear maintenance: active --- # staticmap — A small, python-based library for creating map images with lines and markers. License: unclear · Maintenance: active · Downloads: 180.2K/mo ## What it is and what it does StaticMap is a lightweight Python library for rendering geographic map images by compositing map tiles with drawn overlays. It fetches tiles from a tile server (defaulting to OpenStreetMap), then uses Pillow to composite lines, circle markers, polygons, and custom icon markers onto the base map. The library handles coordinate-to-pixel projection and tile fetching via requests, making it straightforward to generate static map images for web pages, reports, or batch processing without needing a full web mapping framework. You create a StaticMap instance with desired dimensions, add geographic features (lines between coordinates, markers at points, filled polygons), and call render() to get a PIL Image object. The library is designed for simple, single-image use cases—showing a route, marking locations, or visualizing geographic data as a PNG or other image format. It depends on Pillow for image manipulation and requests for HTTP tile fetching. Use it for: - Generate a static map image showing a route or journey between two cities for embedding in a report or email. - Create a map with markers pinpointing store locations or event venues for a web page or printed flyer. - Visualize geographic data (e.g., sensor readings, delivery points) as an overlay on a map tile for batch processing. - Build a simple map preview for a travel or logistics application without deploying a full interactive mapping service. - Render a polygon boundary (e.g., a service area or administrative region) on a map tile for documentation or analysis. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates static map images with geographic lines, markers, and polygons by fetching tiles from a map server and compositing them with Pillow. Yes, if you need to generate simple static map images programmatically. Low install friction, no security vulnerabilities, and active maintenance make it a straightforward choice. Caveat: verify the license treatment before use in proprietary work, since the fact sheet does not confirm the Apache 2.0 claim. Not suitable if you need interactive maps or real-time map updates. ## Install pip install staticmap uv add staticmap poetry add staticmap ## Installing staticmap Before you install: Low friction: pure Python wheel with only three runtime dependencies (Pillow, requests, futures). Actively maintained with recent commits; last release was 2023-08-01 but repo shows activity as of 2026-07-31. License in practice: License treatment is unclear—the description states Apache License 2.0, but the fact sheet records no SPDX identifier or raw license field. Verify the actual license before use in proprietary or GPL-licensed projects. Quickstart: pip install staticmap 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') Verify before relying: - Actual license SPDX identifier and whether it is truly Apache 2.0 as stated in the description - Minimum Python version requirement (listed as unspecified in fact sheet) - Whether futures dependency is needed for Python 3.x (it is typically a backport for Python 2) ## Package facts - License: not declared (unclear) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 180.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags static map image generation, draw lines on map, map markers and overlays, geographic visualization, tile-based map rendering, osm map image, python map graphics, cartography, geospatial, image-generation [View on SkillFed](https://skillfed.io/packages/staticmap) · [View on PyPI](https://pypi.org/project/staticmap/)