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

Add PLpeopleLayer #361

Merged
merged 6 commits into from
Jan 28, 2020
Merged

Add PLpeopleLayer #361

merged 6 commits into from
Jan 28, 2020

Conversation

nstjean
Copy link
Contributor

@nstjean nstjean commented Jan 22, 2020

This is one of the parts of getting the people layer to show up in plots2! publiclab/plots2#3090 (comment)

src/AllLayers.js Outdated
@@ -7,7 +7,7 @@ L.LayerGroup.environmentalLayers = L.LayerGroup.extend(
currentHash: location.hash,
// Source of Truth of Layers name .
// please put name of Layers carefully in the the appropriate layer group.
layers0: ['purpleLayer', 'toxicReleaseLayer', 'pfasLayer', 'aqicnLayer', 'osmLandfillMineQuarryLayer', 'Unearthing'],
layers0: ['PLpeopleLayer', 'purpleLayer', 'toxicReleaseLayer', 'pfasLayer', 'aqicnLayer', 'osmLandfillMineQuarryLayer', 'Unearthing'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey, P should be small here, otherwise it will break.
This name should be exactly similar to Layer's function name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, ok.

@@ -608,7 +608,7 @@


L.layerGroup.pLpeopleLayer = function (options) {
return new L.LayerGroup.PLpeopleLayer(options) ;
return new L.LayerGroup.pLpeopleLayer(options) ;
Copy link
Collaborator

Choose a reason for hiding this comment

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

So this P should be in capital. Otherwise this will go in infinite recursion!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That causes it to break, there is no function with a capital P?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I see now. Two places had to be changed, thanks!

@nstjean
Copy link
Contributor Author

nstjean commented Jan 27, 2020

oneLinerCodeExample:
FireShot Capture 239 - Leaflet Environmental Layers -

index.html:
FireShot Capture 240 - Leaflet Environmental Layers -

@nstjean nstjean changed the title [WIP] Add PLpeopleLayer Add PLpeopleLayer Jan 27, 2020
@jywarren
Copy link
Member

Amazing, great progress here. I'm thinking we need some extra explanation of "why heatmaps PLUS markers" or more simply "what am i looking at here?" you know? What do you think, design-wise, we can do? The menu is one place, but if it's not included, is there another place or way to explain the display convention? Thank you!!!

@crisner
Copy link
Contributor

crisner commented Jan 28, 2020

Quick question, would we be adding PLpeopleLayer by default to the layer menu in LEL or are we planning it to be included only when integrated with plots2?

@jywarren
Copy link
Member

Uh, i think default is fine! People can exclude it with the exclude option if they want!

@jywarren jywarren merged commit 86613f8 into publiclab:master Jan 28, 2020
@welcome
Copy link

welcome bot commented Jan 28, 2020

Congrats on merging your first pull request! 🙌🎉⚡️
Your code will likely be published to https://publiclab.github.io/leaflet-environmental-layers/example/ in the next few days.
Do join our weekly check-in to share your this week goal and the awesome work you did 😃. Please find the link pinned in the issue section 📝
Now that you've completed this, you can help someone else take their first step!
Reach out to someone else working on theirs on Public Lab's code welcome page. Thanks!

Help others take their first step

Now that you've merged your first pull request, you're the perfect person to help someone else out with this challenging first step. 🙌

https://code.publiclab.org

Try looking at this list of `first-timers-only` issues, and see if someone else is waiting for feedback, or even stuck! 😕

People often get stuck at the same steps, so you might be able to help someone get unstuck, or help lead them to some documentation that'd help. Reach out and be encouraging and friendly! 😄 🎉

Read about how to help support another newcomer here, or find other ways to offer mutual support here.

@jywarren
Copy link
Member

Merging this!!! 🎉

@jywarren
Copy link
Member

Could we do the explanation of the people layer in a follow up? Thank you! That way we work in small chunks that are easier to merge. I didn't want to hold you up!

@nstjean
Copy link
Contributor Author

nstjean commented Jan 28, 2020

Yes, sure! :)

@nstjean nstjean deleted the add-people-layer branch January 28, 2020 16:10
@jywarren
Copy link
Member

Ah! I just found these pages which may help to explain the people layer and how it works!

https://publiclab.org/notes/sagarpreet/04-02-2019/introducing-leaflet-blurred-location-display
https://publiclab.org/wiki/location-privacy/

@nstjean
Copy link
Contributor Author

nstjean commented Jan 30, 2020

Excellent!! I'll link to this in the browser menu, along with a short explanation!

@nstjean nstjean mentioned this pull request Mar 3, 2020
5 tasks
sagarpreet-chadha added a commit that referenced this pull request Mar 25, 2020
* Remove use of hardcoded extents for displaying layers (#332)

* Fix embed code with duplicated text (#340)

* Fix duplication of text in embed code

* Update build file

* Update README.md (#335)

* Update README.md

* Update README.md

* Add check that layers group is not undefined when creating layers-sub-list (#339)

Fixes #333

* Display new items mark in layers menu (#341)

* Create function to check for available layers

* Display badge to show new items

* Save map instance in a variable

* Update readme

* Add contribute button to open infra map

* Add media queries for size 235x300 (#346)

* Add default basemap when undefined (#351)

* Add default basemap when undefined

* Update version number indicating bug-fix

* [WIP] Add layers in include to map by default (#352)

* Add unearthing layer to demo

* Fix bug with removing points from the map on removeLayer

* Add all layers in include param upon map initialization

* bump to v2.1.9

* Implement new menu

* Add new menu dependancies

* Fix styles from overriding default leaflet classes

* Refactor code

* Fix styles for layer group name and layer description

* Add option to disable layer visibility when param.include is true

* Add option to use default layer control

* Fix errors when trying to display layer when out of bounds

* Add missing viewport meta tag

* Move styles to LeafletEnvironmentalLayers.css

* Update documentation

* Add missing dependencies and update build

* Fix error from unearthing layer on page reload

* Set addLayersToMap options from param

* Update documentation

* Update AllLayers.js (#366)

Fixed: Prevent use of the same default tile layer for multiple maps

* Add PLpeopleLayer (#361)

* add PLpeopleLayer to maps

* fix function name to PLpeopleLayer

* fix capital in function name

* make naming consistent for both map examples

* change layer name to PLpeople

* version 2.2.0 and bump LBL to 1.7.0 (#368)

* Feature/minimal mode (#356)

* Create toggle mode control

* Add marker for minimal mode

* Change markers on mode change

* Add condition and marker styles for eonet fires layer

* Add minimal mode content to layers in layercode

* Add minimal mode content to aqicn layer

* Add minimal mode option

* Refactor minimalMode control

* Add mode control to one liner code

* Add documentation to readme

* Fix duplication of layers control, set simple layer control for demo

* Add basic tests

* Update build

* 2.2.0

* Change button names and title

* Update tests for mode control

* Update build

* Add demo with multiple maps in a single page

* Add a check for jQuery and update build

* Bug/fix missing layers in layer menu on refresh (#375)

* Fix 'moveend' event check to affect only when removing layers from map

* Add a check when adding minimal markers to confirm this._map exists

* Update build

* fix conflict

* add parameter display to turn on layers

* check if layer exists before turning it on

* Remove conditions and code responsible for jquery duplication

* Update link to jquery 3.3.1 and remove references to older versions

* Move info.json outside iife and update build

* Install cypress

* published

* Bug/fix layers not removed from map when hash false (#380)

* Add error handling on removing unearthing from map

* Remove redundant code

* Comment out unused baselayer instantiation and update build

* Uncomment baselayers

* Reformat init defaults (#396)

* rewrite init defaults

* remove console.log

* use L.Util.setOptions to set defaults

* Add Cypress

* Add tests to check leaflet left controls

* Add tests for embed prompt and layers menu

* Add child window to prevent iframe conflict on hash change

* Add test to check hash update on map movement

* Move hash test to a seperate file and increase delay

* Set up http server for localhost

* Ignore cypress screenshot and video folders

* Set up cypress in travis

* Oneliner/basic implementation tests (#397)

* testing all the specs

* using babel

* add layer name id to broswer menu

* leaflet not fully loading

* recent tests

* testing error in multiple maps

* rewrite init defaults

* basic one liner tests work

* test shorter transpile files

* emove jquery from gruntfile browserify dist

* use L.Util.setOptions to set defaults

* turn on basic tests again

* disable babel-plugin-transform-object-rest-spread

* clean up

* rebase

* add wisconsin layer back in and fix error

* remove text-table files

* add css file back in

* fix merge errors

* Edit and update documentation for more clarity (#367)

* Add dependencies to documentation

* Add updated documentation to readme

* Add more information

* Edit usage example for layer menu

* Added links to more information

* Update minimal mode documentation

* Add files via upload

* added a layerData folder containing the json file for sea level rise data

Co-authored-by: Renisha Christie. A <29401459+crisner@users.noreply.github.com>
Co-authored-by: Suyash Choudhary <57896905+sssash18@users.noreply.github.com>
Co-authored-by: llabake <lemboyelabake@gmail.com>
Co-authored-by: crisner <christie.reni@gmail.com>
Co-authored-by: Sagarpreet Chadha <chadha.sagarpreet97@gmail.com>
Co-authored-by: jywarren <jeff@unterbahn.com>
Co-authored-by: z-arnott <50159450+z-arnott@users.noreply.github.com>
Co-authored-by: Natalie St Jean <49460529+nstjean@users.noreply.github.com>
Co-authored-by: Natalie <natalie.stjean@gmail.com>
Co-authored-by: Cess <cessmbuguar@gmail.com>
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.

4 participants