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

Map addition: add "What's my location" function #119

Open
WABA-Comms opened this issue Sep 2, 2016 · 4 comments
Open

Map addition: add "What's my location" function #119

WABA-Comms opened this issue Sep 2, 2016 · 4 comments

Comments

@WABA-Comms
Copy link
Collaborator

Not much more to add, other than we love this idea! @alulsh, anything else to add?

@WABA-Comms WABA-Comms added this to the Bike Hack Night milestone Sep 2, 2016
@alulsh
Copy link
Member

alulsh commented Sep 2, 2016

Here's an old PR for this: #7

Also, the original issue: #2

If someone can add #7 to our current codebase but with a lower zoom level (11-14) instead of 16 (see #7 (comment)) then I'll gladly merge this!

@mdelcambre
Copy link
Collaborator

We will need to make sure that it is served over HTTPS, Chrome disabled location over insecure hosts: https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins

If you try to use it on chrome right now, you get this error:
getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.

@alulsh
Copy link
Member

alulsh commented Sep 2, 2016

@mdelcambre GitHub recently added HTTPS support to all GitHub pages sites in June 2016 (see https://github.com/blog/2186-https-for-github-pages) so I think we're good here! We're using HTTPS: https://dcfemtech.github.io/hackforgood-waba-map/.

Testing locally right over HTTP will throw an error though. The WABA website is also served over HTTP (http://www.waba.org/) - so this will throw assorted mixed content errors if we embed the project on their website (cc @NellePierson).

You could get around the local testing issue by generating your own self-signed certificate with OpenSSL

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -subj '/C=US/ST=DC/O=Test' -nodes

Then using a local web server to use the above cert. Looks like serve does support HTTPS per the readme but I am getting the following errors when trying to test locally:

alexandraulsh@Bikini-Kill hackforgood-waba-map* master $ serve -s

  error: unknown option `-s'

alexandraulsh@Bikini-Kill hackforgood-waba-map* master $ serve --https

  error: unknown option `--https'

@mdelcambre
Copy link
Collaborator

Yes I noticed after I commented that because we use github pages, it is secure.

For server, the https options appear to have been added after the last release. git blame shows those options on Mar 30, 2014 and the latest (1.4.0) was released Mar 13, 2014

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

3 participants