-
Notifications
You must be signed in to change notification settings - Fork 128
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
When used in a LazyColumn, GoogleMap cannot be scrolled vertically #14
Comments
@JRR-OSU Thank you for opening this issue. 🙏
This is an automated message, feel free to ignore. |
I have not yet been able to test this scenario. Perhaps a boolean property should be exposed in the |
I successfully solved it with cameraPositionState: |
Thanks @sandorbogyo. Just confirmed that that solution works. |
I think it'd be nice to have that solution in the documentation, what do you think? |
@LouisCAD good idea. Would be good to have under a "Common Patterns" section. I'd be happy to add but feel free to send a pull request as well. |
If you have the time, it's best that you do it, I'm quite busy working with OSS projects and starting a company. |
This solution does not work as mentioned here link Please re open this issue and make sure to test it for yourself before accepting a solution |
I'd like to request for this issue to be reopened, as it has not been adequately addressed. There is a documented workaround available now thanks to @barbeau, but that's all it is, a workaround, and it's fairly messy. It's also unclear what parts of the elaborate sample code are needed to actually make it work and what can be left out. (I figured it out via my own minimal sample project.) A Compose component that is draggable by nature should expose draggable behavior out of the box even in the context of nested scrolling, without additional configuration needed. A custom wrapper using Another, preferable, avenue that should be fully explored is the standard Compose nested scrolling support that has been worked on here: https://issuetracker.google.com/issues/174348612. The work is ongoing and I have pointed out its current inapplicability to MapView, so this would be the time to connect with the people behind it and see if it can be done. |
Sorry for the very late reply here, I've finally had some time to circle back to this library. In #78 a solution was added to allow for scrolling working inside a normal Column. The solution doesn't work for LazyColumn, but I've found it can easily be adapted to work. Just swap out the MapInColumn with the code below in the test app to see it in action. Seems to work well! If others can verify this works for them, I'd like to see the docs just updated to show something like this as an example, and then we can again close this issue. Thanks all!
|
I wasn't able to get it working exactly like this, but the experimental motionEventSpy worked like a charm:
|
Didn't work for me |
By @ptornhult , This worked for me |
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you! |
Indeed it works fine. |
TODO: update the docs / sample code to demonstrate this LazyColumn workaround. |
I don't know if anyone faced this issue but if we use Instead we can use the solution mentioned by @funyin. That will solve the issue.
I hope this helps everyone. It resolved issue for me. |
Thanks for your work on this one, it's really great to finally have an official Compose wrapper for Google Maps!
In our use case, we have a custom GoogleMaps wrapper using AndroidView that sits inside a LazyColumn. It is able to be scrolled vertically and horizontally without scrolling the LazyColumn by using a transparent view and calling
.requestDisallowInterceptTouchEvent(true)
on the parent.We are hoping to switch to this, but we noticed it still suffers from the original issue we had to work around. Is usage in a LazyColumn a supported use case and is there a more Compose-friendly way to get nested scrolling working properly with this wrapper?
Thanks!
Steps to reproduce
Thanks!
The text was updated successfully, but these errors were encountered: