dcl-covid-19 / mega-map-dev

Bay Area Community support for COVID-19 - based on NC-COVID-Support
GNU General Public License v3.0
4 stars 4 forks source link

Clicking on a site in sidebar takes me to a different location #8

Closed jayktee closed 4 years ago

jayktee commented 4 years ago

Describe the bug Clicking on sidebar entry for a site takes me to another site location and that site's sidebar entry.

To Reproduce Steps to reproduce the behavior:

  1. On desktop Chrome browser. Selected "SNAP/WIC Retailers" and "Friday".

  2. Zoomed into San Jose to see only the 3 locations there. image

  3. Clicking on one of the sidebar entries, e.g. "Prime Time Nutrition 533", takes me to the sidebar entry for "Target 3265" in East Palo Alto image.

  4. The map also centres around Target 3265, I'm no longer in San Jose.

Expected behavior I assumed clicking on the sidebar entry for Prime Time Nutrition (in the list) would take me to Prime Time Nutrition's entry.

Desktop (please complete the following information):

mfincker commented 4 years ago

Good catch. This is the result of a partial implementation of sorting the list by distance from the center of the map. I have to think about how to fix that properly. For now, I am going to push a quick fix that will let you click on the list and get to the right location but the list and location will update when you move the map.

readingdancer commented 4 years ago

FYI, this was fixed in the NC COVID Support source with the PR: https://github.com/code-for-chapel-hill/NC-COVID-Support/pull/190

mfincker commented 4 years ago

Should not happen anymore since we are using the cartodb_id key column to map the maker with the selected list result.