Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save map and time state in URL #89

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

johnarban
Copy link
Contributor

@johnarban johnarban commented Nov 27, 2024

This PR fixes #88 by creating a sharable url

this component will focus the content once it is displayed and then return focus to the button when closed
@johnarban johnarban requested a review from patudom December 9, 2024 15:00
@patudom
Copy link
Contributor

patudom commented Dec 9, 2024

This is looking good, @johnarban! One thing I'm noticing is that the zoom level doesn't seem to get taken back in when I use the copied url.

This:
http://localhost:8080/?lat=42.3448&lon=-71.1243&zoom=11&t=1733661360000

Gets turned into this:
http://localhost:8080/?lat=42.3448&lon=-71.1243&zoom=4&t=1733661360000
(so the zoom level is reverting to 4 even though I specified 11.)

Another question I have is whether, instead of having the url explicitly change continuously as I pan around, whether it would be less distracting to the user to make a "share" button like we have on the eclipse stories? (and is there any sort of extra cost, either in terms of computational performance or any sort of mapbox credits for continuously displaying the info in the url)?

@johnarban
Copy link
Contributor Author

Fixed the zoom issue (I searched for z instead of zoom).

@patudom - There is no (or incredibly little) additional overhead in updating the url, and it's an easy way to copy the url. We could have a button as well, but I know for me, I often copy urls from the toolbar. It only updates after a change, not while dragging or zooming, and doesn't require any mapbox calls.

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.

TEMPO lite sharable URL
2 participants