wrolpi/modules/map/test
lrnselfreliance 177d0dba4b
The standalone map viewer draws overlays, as the map does (#966)
The standalone viewer (port 8084) drew basemaps only: a map file which is
not a basemap was skipped.  It now offers each overlay in its layer panel,
hidden until turned on, with a checkbox per layer, draws it with the style
beside it when there is one, and shows a feature's attributes on a click.

The overlay logic is the map viewer's own.  It moved to dependency-free
modules (app/src/map-shared) which a browser can load as they are; the
standalone viewer, which has no build step, loads copies of them from
modules/map/static/js.  A test fails while a copy differs from its module
(`npm run sync:map-shared` makes the copies).  What differs between the
viewers is passed in: where a map file and its style are fetched from, and
whether a layer can be checked before MapLibre is given it.

The standalone viewer cannot check a layer first, so it adds an overlay's
layers to the map one at a time once the style has loaded: MapLibre refuses a
whole style over one layer it cannot draw, but only that layer when it is
added by itself.

The API also names a style by its path within the map directory, which is
what the standalone viewer is served.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 17:28:41 -07:00
..
__init__.py Adding __init__ to map/test. 2022-03-09 20:10:58 -07:00
test_api.py A style beside a PMTiles overlay says how the map draws it (#963) 2026-11-13 15:41:43 -07:00
test_downloader.py Map downloads are checked against the hash in the signed manifest (#934) 2026-11-01 20:38:57 -07:00
test_hash_map_manifest.py Map downloads are checked against the hash in the signed manifest (#934) 2026-11-01 20:38:57 -07:00
test_lib.py The standalone map viewer draws overlays, as the map does (#966) 2026-11-13 17:28:41 -07:00
test_map_overview_blob.py Map previews that never drew, and a Docker map with no world under it (#658) 2026-08-11 20:37:23 -06:00
test_pmtiles.py The map draws any PMTiles file as an overlay, in any sub-directory (#962) 2026-11-13 15:11:01 -07:00
test_search.py The map draws any PMTiles file as an overlay, in any sub-directory (#962) 2026-11-13 15:11:01 -07:00