question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exposing GoogleMap.OnCameraMoveStartedListener "reason"

See original GitHub issue

I hooked up fusedLocationClient to cameraPositionState to keep current location regularly updated. I have some logic related to the isMoving flag. However I noticed that this flag is constantly toggling.

Could we expose OnCameraMoveStartedListener so I can check the reason as a flag instead? https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.OnCameraMoveStartedListener

This is currently not exposed. Thanks ❤️!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
barbeaucommented, May 18, 2022

Thanks @arriolac, that makes sense. I can try tackling this. My plan would be to finish the work in PR https://github.com/googlemaps/android-maps-compose/pull/94 that adds more examples in the app, and then add this feature along with a sample implementation in the demo app.

1reaction
arriolaccommented, May 18, 2022

Thanks for clarifying @barbeau . It looks like the library is swallowing the reason flag and should be exposed as a property to CameraPositionState. See: https://github.com/googlemaps/android-maps-compose/blob/main/maps-compose/src/main/java/com/google/maps/android/compose/MapUpdater.kt#L72

Read more comments on GitHub >

github_iconTop Results From Across the Web

GoogleMap.OnCameraMoveStartedListener
Called when the camera starts moving after it has been idle or when the reason for camera motion has changed. Do not update...
Read more >
Is there a way to listen to pans only with GoogleMaps API in ...
OnCameraMoveStartedListener () { @Override public void onCameraMoveStarted(int reason) { CameraPosition ... getCameraPosition(); if (reason == GoogleMap.
Read more >
How can I handle map move end using Google Maps for ...
OnCameraMoveListener and GoogleMap.OnCameraIdleListener . If, for some reason, you want to use the older API which is now deprecated you can use ...
Read more >
Prohibited and restricted content - Local Guides Help
Google Maps is a place for safe exploration of the world around us. For that reason, we don't allow sexually explicit content. This...
Read more >
Places that are not on Google Maps - Quartz
Side-by-side images expose a glitch in Google's maps. Now you see it ... If your city is not on Google maps, does that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found