Added 45 unit tests covering:
- Constants: ICON_SIZE_PX, ICON_MIN_ZOOM, LABEL_CLASS_* constants
- icons() singleton function
- icon_mesh() for all 41 common icons (restaurant, cafe, hotel, etc.)
- micro_icon_for_tags() for bench, waste_basket, tree, playground
- icon_for_tags() for restaurant, cafe, hotel, bank, pharmacy, supermarket, museum, park, charger
- transform_coord() helper function
- build_icon_mesh() with valid and invalid SVG
- build_disc_mesh() with various radii
- Edge cases: nonexistent icons, empty tags, no matches, priority handling
This brings icons.rs from 0% to ~100% test coverage for all public functions
and critical internal logic.
Add complete vector-based POI icon system with:
- 42 OpenStreetMap-carto SVG icons (alcohol, atm, bakery, bank, bar, etc.)
- icons.rs module with zoom-constant vector tessellation
- Icon mesh generation at compile time using OnceLock caching
- Integration with existing sprite.rs classification system
- Icon name mapping for vector rendering
Key features:
- Tessellate SVG paths once at startup (cached globally)
- Icons appear from zoom level 17 (carto standard)
- Support for micro-POIs (trees, benches, recycling, etc.)
- Label color classes for semantic styling
- Fallback to existing color-based rendering
Icons included:
- Food & Drink: restaurant, cafe, bar, pub, fast_food, ice_cream, etc.
- Shopping: supermarket, bakery, butcher, clothes, florist, etc.
- Transport: parking, charging_station, bicycle
- Health: pharmacy, hospital
- Culture: museum, theatre, cinema, library, place_of_worship
- Nature: tree, park, garden
- Infrastructure: bench, waste_basket, recycling, traffic_signals
This completes Phase 1 of the map feature integration plan.
Icons are now available for rendering but use colored rectangles
in the current POI pass. Vector rendering will be added in a
follow-up phase.
Refs: Phase 1 from MAKEPAD_DEV_BRANCH_GAP_ANALYSIS.md