RefugeRestrooms / refugerestrooms

REFUGE restrooms indexes and maps safe restroom locations for trans, intersex, and gender nonconforming individuals.
http://www.refugerestrooms.org
GNU Affero General Public License v3.0
894 stars 261 forks source link

"Guess location" and search by location on homescreen aren't getting the user's location #344

Closed DeeDeeG closed 7 years ago

DeeDeeG commented 7 years ago

Edit (Note): Not sure this is a general problem or just me. Original post below...

Hi,

I tried searching at the homepage, http://www.refugerestrooms.org, by pressing the magnifying glass button. It seems to be trying to search by my location, and the spinner is spinning, but it doesn't go anywhere. (doesn't search or show my location in the text box.) I did grant permission to access my location, and I'm using Firefox. Firefox still allows getting the user's location via HTTP non-secure (unlike Chrome or Opera).

I also tried pressing the "guess my location" button on the submit new restroom page, http://refugerestrooms.org/restrooms/new, and again it doesn't do anything.

It is blocked as expected on Chrome, but this seems like something else. I'm not getting any JavaScript console errors.

(That said, the chrome error message that blocks the request, also points out where in our JavaScript files we try to get the user's location, so that may be helpful. It's apparently application.js, which isn't that helpful, but, it's something.)

DeeDeeG commented 7 years ago

I'm going to try checking our code against this example from the Google Maps API documentation. If there'sanything radically different, it should be easy to notice (they even have code snippets.)

https://developers.google.com/maps/documentation/javascript/geolocation

Edit: maybe this is the correct page. https://developers.google.com/maps/documentation/geocoding/intro

DeeDeeG commented 7 years ago

I'm having trouble reading our JavaScript/CoffeeScript "Promises", but I think some of them don't throw errors to the console when they fail?

(I don't really have a strong ability with JavaScript, but I can say that whatever isn't working, isn't throwing any errors or messages to the console.)

DeeDeeG commented 7 years ago

So my desktop browser can't do geolocation at https://www.openstreetmaps.org or https://maps.google.com

I'm not certain this is a problem with our site, actually.

Geolocate works fine on a family member's tablet.

DeeDeeG commented 7 years ago

This is a Firefox bug. https://bugzilla.mozilla.org/show_bug.cgi?id=1363966