codeforboston / pantry_pickup

Combining city data with a list of specific needs from food pantries will allow citizens to most effectively make useful and needed donations assisted by the Pantry Pick-Up App.
http://www.pantrypickup.org
21 stars 35 forks source link

No pantries visible when loading app on a computer located outside Boston #32

Closed fabacab closed 10 years ago

fabacab commented 11 years ago

When loading Pantry Pickup from a computer outside Boston, no pantries are visible in the default view because the map centers on the user's current latitude and longitude.

It might be useful to instead load the map such that the nearest known pantry and the user's current position are both visible, at the most sensible zoom level.

Also, it might be worth noting that when loading Pantry Pickup, the app immediately requests permission from the Web browser to share its latitude and longitude (geo lat/long). If this is denied, Boston is assumed.

To test this, I installed the Manual GeoLocation extension and set it to different points while re-loading the Pantry Pickup page.

carpeliam commented 11 years ago

Showing at least one pantry sounds like a good thing to do, with an appropriate zoom. I can't say that we'll get to this soon, as the top priority right now is building ways to get real pantry data into the system, but I've noticed this issue too.

That's right about immediately requesting permission, and using Boston as a fall-back- is that not a good user experience? Can you think of a way to improve this?

fabacab commented 11 years ago

Oh it's not bad UX, I just thought I'd mention it since we're talking about automatic re-centering. I think the Google Maps default is to simply scale to include all the data you load into the GMap object, which might be a better (and easier?) default rather than assuming a hard-coded location. Besides, most of your data is gonna be in Boston for the foreseeable future anyway, so using the GMaps default won't even functionally change much. And it seems like stripping out a hard-coded assumption of a default location is probably good for portability, anyway, no?