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

Fix baselayer selection in the map's layer control #300

Merged

Conversation

crisner
Copy link
Contributor

@crisner crisner commented Dec 13, 2019

Fixes #299 (<=== Add issue number here)

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updation
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@crisner
Copy link
Contributor Author

crisner commented Dec 13, 2019

Screenshot of issue fixed:
baselayer-fix

@crisner crisner mentioned this pull request Dec 13, 2019
5 tasks
@crisner
Copy link
Contributor Author

crisner commented Dec 13, 2019

Continuation of PR #296

@crisner
Copy link
Contributor Author

crisner commented Dec 13, 2019

The URL hash showed the initial base layer's name along with the active base layer's name in a map with more than one base layer when the browser was reloaded:

http://127.0.0.1:5500/example/oneLinerCodeExample.html#lat=30.11&lon=8.92&zoom=4&layers=Grey-scale,Streets,odorreport,eonetFiresLayer

Fixed it to:

http://127.0.0.1:5500/example/oneLinerCodeExample.html#lat=30.11&lon=8.92&zoom=4&layers=Streets,odorreport,eonetFiresLayer

Copy link
Collaborator

@sagarpreet-chadha sagarpreet-chadha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey you can implement the changes i told in the PR #296.
And then we will merge this PR. Closing the other PR. Thanks!
Great work 😄 !

@crisner
Copy link
Contributor Author

crisner commented Dec 16, 2019

@crisner
Copy link
Contributor Author

crisner commented Dec 16, 2019

@sagarpreet-chadha, as you had mentioned we should change the path in the scripts for the plots file here:

https://github.com/publiclab/plots2/blob/3f239088f6028b2e87668f7cd9076295dfe4e79d/app/views/map/_mapDependencies.html.erb#L20-L21

<%= javascript_include_tag('/lib/leaflet-environmental-layers/example/lib/glify.js') %>

and also add the link to the fullUrlHash.js file. I shall open an issue for this in the plots repo once this is merged. Thanks!

@sagarpreet-chadha sagarpreet-chadha merged commit 0b646cc into publiclab:master Dec 16, 2019
@sagarpreet-chadha
Copy link
Collaborator

Awesome thanks!

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.

Fix active base layer selection
2 participants