-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Button To Change Map Style #1054
base: staging
Are you sure you want to change the base?
Adds Button To Change Map Style #1054
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -166,16 +164,7 @@ const PropertyDetailSection: FC<PropertyDetailSectionProps> = ({ | |||
return featuresInView.slice(start, end); | |||
}, [page, featuresInView, smallScreenMode]); | |||
|
|||
return hasLoadingError ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error UI was removed because changing the map style temporarily causes an error due to no items being in the property list. I noticed there is a separate UI designed specifically for "no results," rather than displaying the error UI. I wanted to bring this to attention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DonovanAndrews300 before removing the error UI, can you look at PR #732? The error UI appears if the map fails to fetch data. Removing that UI might have unexpected consequences and re-introduce a bug that was fixed by that previous PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this you were absolutely correct in removing the error UI causing breaking changes for the reasons mentioned in the PR you linked. I added the UI back in and instead just had it skip setting the error state in the map component depending on the error received.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DonovanAndrews300 can you use the switch control mentioned in the ticket requirements? Thanks!
@DonovanAndrews300 just wanted to chime in and say thanks for working on this! Progress looks good--excited to see it deployed. |
@CodeWritingCow is this ready to go? Can you merge it if it is? |
@nlebovits @DonovanAndrews300 GitHub didn't deploy to Vercel preview environment. I'm running the PR code locally to see if there's anything that might be causing this. |
e07efa0
to
dc84a95
Compare
src/components/PropertyMap.tsx
Outdated
if ( | ||
e.error.cause === | ||
"The layer 'vacant_properties_tiles_polygons' does not exist in the map's style and cannot be queried for features." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we handle errors just by calling setHasLoadingError(true);
?
The if
statement seems unnecessary, especially because it's comparing e.error.cause
to a hardcoded error message.
Replace Mapbox geocoding control with Maptiler Geocoding control. Comment out line of code that was causing NextJS Web application to crash.
eaf3666
to
667ed89
Compare
@DonovanAndrews300 when the map first loads, it doesn't show any streets: Can we make it load with streets showing, like what we have in production? |
Description
This PR introduces a button in the top-left corner of the Find Properties map. The button allows users to toggle between the three currently enabled map styles. Addresses (Issue#890)
Steps to Test
Screenshots
Screencast.from.12-17-2024.02.38.09.PM.webm