-
Notifications
You must be signed in to change notification settings - Fork 515
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
Listener Called when camera moved / Bounding Box #131
Comments
@matyhaty The new getVisibleRegion() method has landed (for Android) in #152. iOS support is still WIP (see #170) . |
I believe the use case for the `onCameraIdle` event [1] is large enough that this event should be able to be listened to directly without having to listen to extraneous events via the ChangeNotifier interface. The extraneous events which I think add too much noise when combined with the camera idle event include: * Camera Start/Move Events * Updating Map Options * Adding/Updating/Removing/Clearing a Symbol, Line, or Circle For example, the use case described in flutter-mapbox-gl#131 where a client wants to display symbols within a bounding box after a user pans the map should be able to have first-class support. FWIW, other flutter mapping plugins provide this ability, and it is very useful. Usage: ``` MapboxMap( onCameraIdle: () { print("Camera has idled."); }, ); ``` [1] https://github.com/tobrun/flutter-mapbox-gl/blob/1bbe7ea7adc8030af16a3cdbf5ade2f94ddea6bd/lib/src/controller.dart#L156 [2] https://github.com/flutter/plugins/blob/61775d32f1d1f0997e0e93bb1e8676b96be9d848/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart#L136
I believe the use case for the `onCameraIdle` event [1] is large enough that this event should be able to be listened to directly without having to listen to extraneous events via the ChangeNotifier interface. The extraneous events which I think add too much noise when combined with the camera idle event include: * Camera Start/Move Events * Updating Map Options * Adding/Updating/Removing/Clearing a Symbol, Line, or Circle For example, the use case described in flutter-mapbox-gl#131 where a client wants to display symbols within a bounding box after a user pans the map should be able to have first-class support. FWIW, other flutter mapping plugins provide this ability, and it is very useful [2]. Usage: ``` MapboxMap( onCameraIdle: () { print("Camera has idled."); }, ); ``` [1] https://github.com/tobrun/flutter-mapbox-gl/blob/1bbe7ea7adc8030af16a3cdbf5ade2f94ddea6bd/lib/src/controller.dart#L156 [2] https://github.com/flutter/plugins/blob/61775d32f1d1f0997e0e93bb1e8676b96be9d848/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart#L136
Hi all
We are using this plugin to add a lot of points and lines to the map.
So we need to ensure we only draw what is needed (aka the viewport) and when the camera is moved or panned - we update the map with new points and lines within the new viewport.
We dont seem to have:
Apologies if we have missed this, but any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: