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

Toggle for Betterplace donation overlay #73

Closed
steampixel opened this issue Feb 18, 2019 · 6 comments
Closed

Toggle for Betterplace donation overlay #73

steampixel opened this issue Feb 18, 2019 · 6 comments

Comments

@steampixel
Copy link

Hey,

the betterplace donation overlay is a great idea. But I think it would be cool to have an option to hide this overlay if someone embeds the map. At our store window we have a tiny luftdaten.info screen that rotates over several map positions in germany and our city. (https://github.com/steampixel/luftdaten-infoscreen) This is very usefull and informative for pedestrians. Unfortunality the betterplace button is very big on our little screen and just a little useless :-)

It would be great if we could have some configuration option via URL. Something like http://deutschland.maps.luftdaten.info/?nooverlay#7/51.944/10.327 or http://deutschland.maps.luftdaten.info/#7/51.944/10.327/nooverlay

I think this could be done in pure JavaScript. What do you think about this?

@ricki-z
Copy link
Member

ricki-z commented Feb 19, 2019

Hi @steampixel ,
I have published a new version that should work with the second url of your two examples.
So you have to define zoom and location and then append "/nooverlay". Then the add shouldn't be shown.

@steampixel
Copy link
Author

Awesome! Seems to work perfectly. I will try it out later on our little screen.

@steampixel
Copy link
Author

steampixel commented Feb 19, 2019

Hm. There seems to be some kind of an issue with that. Try the following:

Just copy the following urls into your web browser one after another and hit enter (testet on Firefox and Chrome)

https://deutschland.maps.luftdaten.info/#13/49.7956/9.9636/nooverlay
https://deutschland.maps.luftdaten.info/#11/49.8014/10.0337/nooverlay
https://deutschland.maps.luftdaten.info/#9/49.5760/10.9591/nooverlay
https://deutschland.maps.luftdaten.info/#8/48.865/11.841/nooverlay
https://deutschland.maps.luftdaten.info/#5/50.732/10.745/nooverlay

The expected behavior should be, that the map should change its area and zoom. But with the /nooverlay option this works not consistently. Our infoscreen works by replacing the src attribute of an iframe to achive this.

@ricki-z
Copy link
Member

ricki-z commented Feb 19, 2019

I have changed the map again. It seems that we can't use the url hash for this. So the 'new' format for the 5 urls is:
https://deutschland.maps.luftdaten.info/?nooverlay#13/49.7956/9.9636
https://deutschland.maps.luftdaten.info/?nooverlay#11/49.8014/10.0337
https://deutschland.maps.luftdaten.info/?nooverlay#9/49.5760/10.9591
https://deutschland.maps.luftdaten.info/?nooverlay#8/48.865/11.841
https://deutschland.maps.luftdaten.info/?nooverlay#5/50.732/10.745
(important: '?nooverlay' has to come before the zoom and position hash)

@steampixel
Copy link
Author

Ok. Seems to work now :-) Thank you!

@ricki-z
Copy link
Member

ricki-z commented Feb 19, 2019

I have added a short description to the readme.
If everything is working as expected please close the issue.

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

2 participants