-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
feature: Update to use Maplibre with Protomaps API #988
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rudokemper
requested changes
Jan 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so, so awesome!
A few comments:
- Now that we are using Protomaps for online, the title "Online Map Configuration" in Theme makes less sense. Can we make a change in this PR to call it "Mapbox Map Configuration (Optional)"? And rename "Activate 3D Terrain view for online map" to "Activate 3D Terrain view for Mapbox map"?
- The Rails Place show map zooming behavior is a bit wonky for me in both Mapbox and Maplibre. Sometimes it will work at first, and then stop; other times I can only zoom in/out a little bit. I think it might have to do with panning being disabled. I'd say we can just enable it. I don't think it's undesirable to permit the user to pan around; if they get lost, they can just refresh the page.
I know we are planning docs overhaul, but I think it could be good to at least have some bare minimum indication of how to set things up, like the Protomaps API key env var. I'm happy to contribute this - will push up a change.
Also update basemap style theme when provided, default to Contrast otherwise.
rudokemper
approved these changes
Jan 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is backwards compatible with usage of mapbox configuration and maplibre with Tileserver.
It further expands functionality to:
Testing
PROTOMAPS_API_KEY
to the newly created API key, or the one you received from a stewardDevelopment
run
docker compose --profile dev up
If you run into issues with dependencies, run:
docker compose run --rm web yarn
docker compose run --rm web bundle
Offline
This assumes you already have the database setup.
This assumes you already have tileserver setup.
If you have neither, run
bin/setup
before proceeding.compose.yaml
servicelocalweb
image tag toalpha-0.0.1
which contains a prebuilt image from these changes, OR rundocker build -t terrastories-offline-test -f rails/Dockerfile .
and then update the image todocker compose --profile offline up