Skip to content

feat: add geolocation control and persist map view - #72

Merged
KristjanESPERANTO merged 4 commits into
opening-hours:mainfrom
KristjanESPERANTO:feat
Feb 26, 2026
Merged

feat: add geolocation control and persist map view#72
KristjanESPERANTO merged 4 commits into
opening-hours:mainfrom
KristjanESPERANTO:feat

Conversation

@KristjanESPERANTO

@KristjanESPERANTO KristjanESPERANTO commented Feb 22, 2026

Copy link
Copy Markdown
Member

feature 1: geolocation control

The geolocation control lets the user jump to their current location.

bildo

The position is shown with a marker and an accuracy circle; repeated clicks update both.

Solves #22.

feature 2: persist map view

lat/lon/zoom are saved to localStorage on every map move and restored on the next page load. URL parameters (Permalink) take priority.

- Add geolocation button wiring and setup
- Move styling to CSS with dark theme support
- Initialize UI before map and attach geolocation after map creation
Comment thread js/main.js Outdated
@KristjanESPERANTO
KristjanESPERANTO merged commit ff09a89 into opening-hours:main Feb 26, 2026
1 check passed
@ypid

ypid commented Mar 21, 2026

Copy link
Copy Markdown
Member

This seems to break clicking on POIs (green, red circles). I have deployed this PR to https://openingh.ypid.de/ but not on https://openingh.openstreetmap.de/.

@KristjanESPERANTO
KristjanESPERANTO deleted the feat branch March 22, 2026 09:14
@KristjanESPERANTO

Copy link
Copy Markdown
Member Author

This seems to break clicking on POIs (green, red circles).

Oh, I'm on it.

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.

3 participants