[go: nahoru, domu]

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

Source of camera movement - Exposing GoogleMap.OnCameraMoveStartedListener "reason" #49

Closed
webfrea-k opened this issue Feb 28, 2022 · 5 comments · Fixed by #154
Closed
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@webfrea-k
Copy link
Contributor

Hi!

Is there an equivalent for OnCameraMoveStartedListener.REASON_GESTURE? If not, can you please support it? I would like to trigger a specific action when users moves the map. I've searched CameraPositionState.kt and found isMoving but this works the same if the camera was moved by code or by user.

@webfrea-k webfrea-k added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 28, 2022
@arriolac arriolac added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 28, 2022
@jpoehnelt
Copy link
Contributor

@webfrea-k Please take a moment to fill out this short survey. Thank you!

This is an automated message, feel free to ignore.

@polivmi1
Copy link
Contributor
polivmi1 commented Mar 9, 2022

We do have the same use case. Some location with markers is being followed and when the user moves the map, the automatic "following" will stop. GoogleMap.OnCameraMoveStartedListener.REASON_GESTURE will tell us exactly that.

@polivmi1
Copy link
Contributor
polivmi1 commented Mar 9, 2022

As a workaround I could use a detection modifier which doesn't consume the events:
.pointerInput(Unit) { forEachGesture { awaitPointerEventScope { awaitFirstDown(requireUnconsumed = false) actionOnReasonGesture() } } },

@arriolac arriolac added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Mar 9, 2022
@arriolac
Copy link
Contributor
arriolac commented Mar 9, 2022

This can be supported as another property on CameraPositionState

@barbeau barbeau assigned barbeau and unassigned arriolac May 23, 2022
@barbeau barbeau changed the title Source of camera movement Source of camera movement - Exposing GoogleMap.OnCameraMoveStartedListener "reason" May 23, 2022
@barbeau
Copy link
Contributor
barbeau commented Jun 22, 2022

I've opened a PR for this feature at #154.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants