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

Swipe and sync between two maps #404

Open
kylebarron opened this issue Mar 4, 2024 · 0 comments
Open

Swipe and sync between two maps #404

kylebarron opened this issue Mar 4, 2024 · 0 comments

Comments

@kylebarron
Copy link
Member

It would be cool to have a way to do "map comparisons" from Python. This would be along the lines of mapbox-gl-compare:

On the JS side, this would take a bit of work. Primarily, I have to figure out how to:

  • render two map views, either side by side or possibly above and below
  • sync the view state between them
  • render a basemap in both

I did a little test:

      <DeckGL
        views={[
          new MapView({
            id: "left",
            width: "50%",
            controller: true,
          }),
          new MapView({
            id: "right",
            x: "50%",
            width: "50%",
            controller: true,
          }),
        ]}
image

It's nice that the deck.gl part is working, but not sure how to get the basemap to render in both.

On the Python side, the easiest way to do this would probably be to have a new SplitMap class that manages two sets of layers.

See also:

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

No branches or pull requests

1 participant