vkoves / electrify-chicago

Learn about Chicago's most polluting buildings, and what they can do to clean up their act!
http://electrifychicago.net
9 stars 5 forks source link

98 search on map is broken #103

Closed alexkcode closed 3 weeks ago

alexkcode commented 1 month ago

Description

Adds a check to map search to make sure that lat long coordinates exist before doing the proximity calculation for the map building search feature.

Fixes #98

Testing Instructions

Checked a couple cases in the frontend, including Willis Tower (which was shown in the original issue). Should currently show all the buildings within the correct proximity of the filtered building.

Checklist:

netlify[bot] commented 1 month ago

Deploy Preview for radiant-cucurucho-d09bae ready!

Name Link
Latest commit 11e8766b5a4a4bf58dfa968bd859397156ea969f
Latest deploy log https://app.netlify.com/sites/radiant-cucurucho-d09bae/deploys/66564cb2c727ab0008cddeb3
Deploy Preview https://deploy-preview-103--radiant-cucurucho-d09bae.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

vkoves commented 1 month ago

@alexkcode - I'm a little confused, I pulled your branch and still saw the issue, went to the map page and searched for the Willis Tower:

Screenshot from 2024-05-27 20-33-09

alexkcode commented 1 month ago

Crap made a stupid mistake. I think it should be fixed now but not entirely sure if what I'm what I'm doing is not an anti-pattern. Essentially I changed it so I'm just intermittently checking for NaN.
Screenshot 2024-05-28 at 16-22-58 Map - Electrify Chicago

alexkcode commented 1 month ago

@vkoves please re-review when you get a chance!