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

Made domain name a settable domain name option #307

Merged

Conversation

crisner
Copy link
Contributor

@crisner crisner commented Dec 17, 2019

Fixes #306 (<=== 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 17, 2019

The domain name can be passed as a settable option through the embed control as:

L.control.embed({
   hostname: 'hostname'
});

and also passed as an option in LEL as:

L.LayerGroup.EnvironmentalLayers({
        baseLayers: {
          'Grey-scale': baselayer1
        },
        hash: true,
        embed: true,
        hostname: 'hostname'
      }).addTo(map);
Screenshot defaulting to Public Lab's gh-pages:

before-hostname

Screenshot after adding a domain name:

after-hostname

@crisner
Copy link
Contributor Author

crisner commented Dec 17, 2019

Changes made in this PR include formatting the edited layers and adding a new rule to the eslint config file.

@@ -78,7 +78,8 @@
include: ['asian', 'clouds', 'Unearthing'],
// exclude: ['mapknitter', 'clouds'],
hash: true,
embed: true
embed: true,
// hostname: 'domain name goes here'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome!

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.

Make domain name as a settable option defaulting to the gh-pages
2 participants