Public Lab Research note

Leaflet Environmental Layer Library - Part 2

by sagarpreet | July 16, 2018 17:43 16 Jul 17:43 | #16724 | #16724

Hi all ! This post is continued from and explains various more layers added to the library .

Summary of the library :

This library is a made upon the very popular LeafletJS Library and using this we can choose combinations of layers to display on map . Each layers gives some environment - related information on map in form of small markers . Each marker on clicking shows pop-up with detailed information .

The demo of this library is :

**The Github link to code repository is **:

Layers list we can choose :


1.) PurpleAir Layer :

An air quality monitoring network built on a new generation of "Internet of Things" sensors.

A proven air quality monitoring solution for home enthusiasts and air quality professionals alike.

Using a new generation of laser particle counters to provide real time measurement of (amongst other data), PM1.0, PM2.5 and PM10. PurpleAir sensors are easy to install, requiring a power outlet and WiFi. They use WiFi to report in real time to the PurpleAir Map.

More details :

Heat-Map :


Detailed - layer :


2.) FracTracker Layer :

FracTracker Alliance studies, maps, and communicates the risks of oil and gas development to protect our planet and support the renewable energy transformation.

FracTracker is a leading resource on oil and gas issues and a trusted asset to the concerned public.

More information can be found here :

3.) MapKnitter Layer :

Balloon mapping is a low-cost way to take aerial photos using a camera, attached to a balloon, on a spool of string. People have done this from a few hundred feet up all the way to over 4,000 feet in the air.

For more information visit :



4.) OpenInfra-Map Layers :

Open Infrastructure Map is a view of the world's hidden infrastructure mapped in the OpenStreetMap database.

More information can be found here :

a.) Telecom layer :


b.) Water layer :


c.) Power layer :


About Project :

This project is created as a part of Google Summer of Code program by Sagarpreet Chadha .

Mentors for this project :

• Stevie Lewis

• jywarren

• Bronwen Densmore

If you have any suggestions or any doubts regarding the use of this library , kindly open an issue here .

Thank you


Hi! Great post! I had trouble with this link: Can you check it for me?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

Hi ! Thanks . Updated the link 😄 .

Reply to this comment...

Looks great! Could the layers also have a pop-out that explain what they are, where they are from and where people can learn more when you click on them?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

@xose @imvec @sarasage - I'm really interested in how these layers can help inform and support local environmental projects. I noticed that if you zoom into Val Verde, where @sarasage and others are working, the wind direction is helpful but not that great -- you have to zoom out a bit to see a nearby weather station.



I'm wondering two things --

  1. are there sources of better or more local wind data? Or if folks hooked up weather stations, would it be possible to get that data to show up?
  2. what about sources of groundwater flow direction data?
  3. are there sources of data for landfills, since although it's great to see petroleum, power, and water infrastructure on this map, the Chiquita landfill doesn't appear? Does OpenStreetMap have an API for us to show points identified as landfills?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

The landfill is shown on OpenStreetMap!

Reply to this comment...

I found that there is a landuse=landfill tag, from

Using that, I made a query on this page:*[landuse=landfill][bbox=-118.66693,34.41951,-118.57801,34.46906]

Note this can only be used for very zoomed-in areas, so not for a view of a whole continent or country.

It shows this output in XML:


<tag k="name" v="Chiquita Canyon Landfill"/> <tag k="operator" v="Waste Connections Inc"/>

Looking for how this could be gotten in JSON; docs here:

And it works! See:[out:json];waylanduse=landfill;out%20meta;

It's a polygon, the outline of the landfill.

@sagarpreet, could we use this as an additional layer?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

@liz - you know some OpenStreetMap folks, do you know if this is an OK use of the API in terms of how often we'd query?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...

Reply to this comment...

Login to comment.