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

[Doc] OpenLayers example #8834

Open
rose-alex42 opened this issue Apr 25, 2024 · 1 comment
Open

[Doc] OpenLayers example #8834

rose-alex42 opened this issue Apr 25, 2024 · 1 comment
Labels

Comments

@rose-alex42
Copy link

Link

https://github.com/visgl/deck.gl/tree/master/examples/get-started/pure-js/openlayers

Description

The current documentation for OpenLayers results in a Deck with a controller: false property and a style: pointer-events:none; which removes any possibility of interacting with the Deck MapView. Changing to controller: true and style: pointer-events:auto; enables Picking to work, but camera controls are broken.

I'm a bit at a loss as there doesn't seem to be any actual working examples anywhere on the net, other than this one, and no documentation on the interoperability between Deckgl and OpenLayers. Reading the code, it feels like there isn't a way for deckgl to tell OpenLayers to change its view. It seems that it's the opposite way, where the OpenLayers Mapview triggers a redraw of Deck when re-rendering.

It feels a bit counter-intuitive to the documentation provided about Overlaid basemaps. From my understanding, it should be Deck telling OpenLayers to redraw when its view changes. Am I completely off track?

Thank you for taking the time to address this.

@Pessimistress
Copy link
Collaborator

You are correct that in this example, OpenLayers is handling user input and triggering Deck redraw.

In the context of Mapbox/Maplibre/Google Maps, the overlaid mode all has the base map control deck. The other way around is referred to as reverse-controlled in the docs.

Since we only have one example for OpenLayers, it is indeed arbitrary to implement the overlaid approach. It does not mean that you cannot integrate deck with OpenLayers interleaved or reverse-controlled. There is no documentation about them because no one has spent enough time looking into the capability of OpenLayers. I'm happy to help you with such implementations if you are interested in contributing to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants