Skip to content
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

[Feat] Unlocked split map viewports #2170

Merged
merged 2 commits into from Mar 27, 2023

Conversation

igorDykhta
Copy link
Collaborator

@igorDykhta igorDykhta commented Mar 26, 2023

PR Changes

  • Adds the ability to have "unsynced" viewports when in split map mode. They can also optionally be set to lock to each other's zooms (regardless of lat/lon or 3D pitch, bearing, etc).
  • New switch toggle controls for this were added to the legend panel.
  • Works in 2D/3D.
  • Changes MapPopover behavior to only ever show 1 instance of the MapPopover. It is only shown in the map that the mouse is hovering over, regardless of split map mode or single map mode.
  • Adds dual geocoders for split + unsynced viewports.

Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Comment on lines +144 to +145
{mapState?.isSplit ? (
<StyledMapControlPanelHeaderSplitViewportsTools>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bringing this one in, @igorDykhta. When I test the deployed PR demo or run it locally myself, I can't get these conditional controls to render. If I force this to true it would look like this in a split maps view:

Screenshot 2023-03-26 at 10 46 33 PM

I'm not sure why yet, but in the demo app code it seems like the parents of this component might now be passing around props that are a flattened mapState instead of when this was originally written to pass in the full mapState. 🤔 Either way, mapState seems to evaluate to undefined now when I try to debug.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwasilgeo yes, I know about this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwasilgeo should be fixed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great when I try it locally. Thanks!

Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
@igorDykhta igorDykhta merged commit 9fc98e8 into master Mar 27, 2023
7 checks passed
@delete-merged-branch delete-merged-branch bot deleted the igr/unlocked-split-map-viewports branch March 27, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants