ekke 56dd8cbda4 Show the Markers layer whenever the district has locations
Switching the layer on only at the moment a location was saved was too narrow.
loadLocations() runs at startup and after every change, and it left the layer
hidden — so markers were visible right after saving and gone again on the next
reload, which is what made it look as though closing Digitise had removed them.

The call moves into loadLocations(), guarded on there being at least one
location. That covers startup, saving, and any later refresh from one place,
and the two calls in the add paths that duplicated it are gone. An empty
district still opens with the layer off, which is what it was created hidden
for.

One trade-off, since it was asked about: an officer who deliberately unchecks
Markers in the layer switcher will find it back on after the next reload or
saved location. Respecting that choice would mean persisting it, which is worth
doing only if anyone actually wants the layer off while holding locations.

Verified both cases: with locations the layer goes visible on the startup load
and stays visible through entering and leaving Digitise and through a reload;
with none it stays hidden throughout.

Service Worker v22 -> v23.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-21 10:05:38 +02:00
..
2026-03-04 12:59:40 +01:00