-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add 2D/3D visibility switch #360
Conversation
packages/map-template/src/components/Map/MapboxMap/ViewmodeSwitch/ViewModeSwitch.jsx
Outdated
Show resolved
Hide resolved
packages/map-template/src/components/Map/MapboxMap/ViewmodeSwitch/ViewModeSwitch.jsx
Outdated
Show resolved
Hide resolved
packages/map-template/src/components/Map/MapboxMap/ViewmodeSwitch/ViewModeSwitch.jsx
Show resolved
Hide resolved
packages/map-template/src/components/Map/MapboxMap/ViewmodeSwitch/ViewModeSwitch.jsx
Show resolved
Hide resolved
packages/map-template/src/components/Map/MapboxMap/ViewmodeSwitch/ViewModeSwitch.jsx
Outdated
Show resolved
Hide resolved
packages/map-template/src/components/Map/MapboxMap/ViewmodeSwitch/ViewModeSwitch.jsx
Outdated
Show resolved
Hide resolved
…tch/ViewModeSwitch.jsx Co-authored-by: Anders Mogensen <[email protected]>
…tch/ViewModeSwitch.jsx Co-authored-by: Anders Mogensen <[email protected]>
…People/web-ui into feature/2D-3D-switch-take-2
packages/map-template/src/components/MapTemplate/MapTemplate.scss
Outdated
Show resolved
Hide resolved
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.
🆗
Ready for review again, fixed all the issues found earlier. ✅ @ammapspeople |
@andreeaceachir142 I just realized this: we're adding a new way of adding a UI control on top of the map (let's call it technical debt). |
Other than that, I maintain my approval ✅ 🆗 |
What
mapbox
,3dwalls
andfloorplan
modules are enabled in the CMSHow
mapboxViewMode
atom which can hold three values: initial3D, clicked3D or clicked2DcurrentPitch
Recoil selector that combines thepitch
property with themapboxViewMode
into a calculated value.ViewModeSwitch.jsx
component which holds the switch buttons and sets the mapboxViewMode when clicked. It also sets the desired pitch and turns on and off the visibility of features on the map.useMapBoundsDeterminer
uses thecurrentPitch
selector to apply the correct pitch when eg. a venue changes.useReset
method to handle thetimeout
property