ward-wise / ward-wise-front-end

6 stars 4 forks source link

Leaflet Map #46

Closed smacmullan closed 7 months ago

smacmullan commented 7 months ago

Add a full screen Leaflet map to the Maps page. Refactor page folder structure to give the Maps page its own layout styling.

smacmullan commented 7 months ago

I'm stilling working on the map features, but might as well merge what I currently have. Everything should work except the address search bar, which is running into a CORS issue (need to move API call to server-side?).

NoahAppelbaum commented 7 months ago

Hey @smacmullan, I moved the API query server-side and fixed a bug in parsing the JSON, and now that query is working and correctly propagating search params. However, it's not updating the Leaflet display -- I tried getting it to work by pulling search params into the center value of the Map component, but I'm not sure if that's the "right way" to do it -- in any case, it's not working. Now that the params are populating from the API, think you can get Leaflet working with them?

smacmullan commented 7 months ago

That's awesome! Yeah, I'll try to get it working tomorrow afternoon. I remember seeing in the leaflet react examples that there's a special way to set up the centering.

smacmullan commented 7 months ago

I implemented the map recentering on search. I think we're ready to merge.

Next steps will be database integration and get the Leaflet components to highlight when selected.