-
Notifications
You must be signed in to change notification settings - Fork 35
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
[docs] Overlaid example on v9.1 #203
base: master
Are you sure you want to change the base?
[docs] Overlaid example on v9.1 #203
Conversation
After many hours attempting to learn and resolve the issue, I must step back and absorb the defeat of the day. I tried bumping mjolnir to v3 and messing with it in this method: deck.gl-community/modules/editable-layers/src/editable-layers/editable-layer.ts Lines 80 to 92 in 8b5c3a9
No matter my approach, the events would not fire... please enlighten me 😩 |
Having exactly the same problem. I think the root cause is that the anyclick event does not get recognised. This gets it working (for me anyway, no gauarntee it works in the generic case on all devices):
|
@ondave this snippet is not working for me on my PC using Chrome, can you add it to the example and contribute it to my PR so I can review it? |
Ah, yes, sorry, didn't read your exact use case close enough. I was having issues with a vanilla deck.gl setup, and that fix patches that case OK, where anyclick just doesn't get fired. For the MapboxOverlay case, I don't think the click events ever get to the deck instance eventManager. The MapboxOverlay captures the events and forwards the events directly to the deck.ts _onEvent function, but the EditableLayers events are registered in the deck instance eventManager. Just out of interest did the EditableLayers (formerly nebula.gl, and pre deck v9) ever work with the MapboxOverlay? I think one of the core dev team would have a better idea about all this. |
I am not sure of this, but this is what I would like to get working in v9.1+.
Patiently waiting 🧘 (though the blame shows most was just forked by @ibgreen from the disbanded nebula team) |
- @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected]
- @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected]
- @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected] - @deck.gl-community/[email protected]
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
@charlieforward9 Have you had any progress finding a solution to this? I appear to be getting bitten by the same issue (EditableGeoJsonLayer not working if following the overlay approach); as speculated above I dont think this related to the v9.1/mjolnir.js change. |
@laurence-hudson-mindfoundry i have worked to keep my progress up to date on this branch, but still no success yet. If you care to debug it with me, this branch is a good place to start |
@charlieforward9 I've had a breakthrough for my own map. Using the interleaved overlay rendering variant (interleaved prop on MapboxOverlay) avoids the event swallowing. While interleaved has some consequences, at least for my app there bearable. So functioning EditableGeoJsonLayer while also retaining the react-map-gl as the outer component (for maplibre's NavigationControl / map api / etc). |
Thanks for the update. Are you able to reproduce it in my example repo that this PR uses so I can build from that? |
Here's a minimal example using MapOverlay (interleaved true works, false doesn't). I struggled to get the dev env for the branch up and running, but here a codesandbox (it uses 9.0, which probably confirms that this sleeper bug has been around for a while). |
Uses changes from #162 to create an example of how to use
EditableGeoJsonLayer
using the overlaid approach, demonstrating a bug explained in #201, where the drawing modes do not work.I was encountering the same problems in overlaid mode in v9.0.x as well.
Please review and advise.