garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /docs/adr/004-osm-tile-integration.md

raw

ADR-004: OSM Tile Integration for Region Textures


Metadata:


Context

Problem: Regions need textured ground planes. Use real-world map imagery for geographic context.

Requirements:

Decision

Use OpenStreetMap tiles fetched over HTTP (ureq) on a background worker thread, with a TileCache resource.

Approach:

Rationale

Primary Reasoning:

  1. OSM: free, legal tiles
  2. ureq: simple blocking HTTP on a worker thread — no async runtime pulled in for this
  3. TileCache: dedupe fetches (memory + on-disk)
  4. LOD: RegionTile::lod_level reserved for future LOD (currently unused)

Alternatives Considered:

AlternativeProsConsRejected Because
reqwestAsyncExtra depsureq is simpler
Pre-bake tilesFaster loadLarge assetsDynamic tiles preferred
MapboxBetter qualityCost, API keyOSM is free

Consequences

Positive:

Negative:

Related