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

PurpleAir layer requests too much data - optimize #505

Open
jywarren opened this issue Feb 16, 2021 · 0 comments
Open

PurpleAir layer requests too much data - optimize #505

jywarren opened this issue Feb 16, 2021 · 0 comments

Comments

@jywarren
Copy link
Member

var PurpleLayer_url = 'https://www.purpleair.com/json?fetchData=true&minimize=true&sensorsActive2=10080&orderby=L';
if (typeof self._map.spin === 'function') {
self._map.spin(true);
}
$.getJSON(PurpleLayer_url, function(data) {

we should be narrowing by bounding box-- maybe i misunderstand this code but https://www.purpleair.com/json?fetchData=true&minimize=true&sensorsActive2=10080&orderby=L returns a TON of data, vs:

https://www.purpleair.com/data.json?fetchData=true&minimize=true&sensorsActive2=10080&orderby=L&nwlat=45.67548217560647&selat=41.79179268262892&nwlng=-101.03576660156251&selng=-93.93310546875001

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

No branches or pull requests

1 participant