Skip to content

spike(world-map): OpenFreeMap vector dark basemap (#7077) — parked#7150

Draft
wcjord wants to merge 1 commit into
mainfrom
fix/vector-dark-map-7077
Draft

spike(world-map): OpenFreeMap vector dark basemap (#7077) — parked#7150
wcjord wants to merge 1 commit into
mainfrom
fix/vector-dark-map-7077

Conversation

@wcjord

@wcjord wcjord commented Jun 23, 2026

Copy link
Copy Markdown

Parked spike for #7077 (dark-map contrast + water). NOT for merge yet — punting on the vector approach for now; this branch preserves the working integration so it can be picked up later.

What this does

Replaces the dark basemap (CartoDB Dark Matter raster) with OpenFreeMap VECTOR tiles, styled client-side, so label contrast + water are ours with a single request. Light mode stays OSM raster. The CartoDB raster is kept as an automatic fallback while the vector style loads / if it errors.

  • pubspec.yaml: vector_map_tiles: 9.0.0-beta.9 (pinned exact — only the 9.x prerelease is compatible with our flutter_map ^8.2.2; stable 8.x needs flutter_map 7, and 10.x needs Flutter main + Impeller).
  • world_map.dart: WorldMapController.darkMapStyle loads the OpenFreeMap dark style once.
  • world_map_view.dart: dark base layer is a FutureBuilder<Style>VectorTileLayer (default raster layerMode so each tile is rasterized once + blitted), raster fallback otherwise; attribution updated to OpenMapTiles.

What's confirmed

  • Co-resolves with flutter_map/flutter_map_marker_cluster 8.2.2 and compiles for Flutter web (the key unknown).
  • OpenFreeMap style + tilejson endpoints are live, valid, key-less, commercial-OK.

Why it's parked

  • Slow to resolve + unproven web perf. vector_map_tiles does not list Web as a supported platform (web support is an open "help wanted" effort); on CanvasKit the initial style+tile resolve is noticeably slow, and parse/paint can land on the UI thread alongside the marker-cluster repaints. Under throttling the cost is real, and we don't yet have a representative perf picture across our actual device mix.
  • Prerelease dependency (9.0.0-beta.9).

To resume

The integration is complete; the open problem is web rendering cost. Options to revisit: self-host OpenFreeMap tiles, tune the vector layer (concurrency / raster mode / tile delay), restyle the OpenFreeMap dark style (water + label colors — it ships "not yet complete"), handle the ne2_shaded raster relief source, and benchmark against real device analytics before flipping it on. Or fall back to the Stadia raster stopgap if a quicker contrast/water win is wanted.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bd898ffa-c771-4965-9e0e-17b7cc255094

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/vector-dark-map-7077

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant