creating-staticmap-mapslisted
Install: claude install-skill walsh-investment/clean-slate-import
# Creating Staticmap Maps
## Overview
Covers generating a static map with the `staticmap` library, manually drawing visible markers and labels with PIL after `m.render()`, embedding the map in a Word document at the correct size, and embedding the legend inside the image so no separate legend paragraph is needed.
## Required Tools
This skill requires the following tools at runtime:
- **staticmap** — Tile-based static map rendering (`pip install staticmap`)
- **Pillow (PIL)** — Manual marker and legend drawing after `m.render()` (`pip install Pillow`)
- **python-docx** — Embedding the final map image in a Word document (`pip install python-docx`)
**Before starting**: Verify that `staticmap`, `Pillow`, and `python-docx` are installed. If any are unavailable, STOP and inform the user which step cannot proceed. Do NOT silently substitute plain-image output for docx embedding.
---
## Critical Pitfalls (Read First)
### 1. `CircleMarker` is invisible under polygon fills
**Problem**: `staticmap.CircleMarker` is composited *below* `Polygon` fills. If you add isochrone polygons (even with low alpha like `#FF000030`), any `CircleMarker` added via `m.add_marker()` will be invisible underneath them.
**Never do this:**
```python
m.add_marker(CircleMarker((lon, lat), "#FF0000", 14)) # INVISIBLE under polygons
```
**Fix**: Do NOT call `m.add_marker()` at all. Draw markers manually with PIL *after* `m.render()`, so they appear on top of everything.
---
### 2. `m.transformer` doe