Skip to content

Conversation

@andynewman10
Copy link
Contributor

Wires onCameraMove in the controller and in MapLibreMap class.

Tested on web successfully.

@gabbopalma gabbopalma requested a review from Copilot October 1, 2025 23:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the onCameraMove callback feature (#642) to provide real-time notifications when the camera position changes on the map. The implementation adds the callback at multiple levels of the widget hierarchy.

  • Adds OnCameraMoveCallback typedef for camera movement events
  • Wires the callback through the MapLibreMap widget and controller
  • Integrates the callback invocation in the platform's camera move stream

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
maplibre_gl/lib/src/maplibre_map.dart Adds onCameraMove parameter to widget constructor and passes it to controller
maplibre_gl/lib/src/controller.dart Defines OnCameraMoveCallback typedef and implements callback invocation in camera move stream

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gabbopalma gabbopalma added this to the v0.24.0 milestone Oct 2, 2025
@gabbopalma gabbopalma added the enhancement New feature or request label Oct 2, 2025
@gabbopalma gabbopalma self-requested a review October 2, 2025 00:03
@gabbopalma
Copy link
Collaborator

gabbopalma commented Oct 2, 2025

Hi @andynewman10, for correct and complete implementation, add the CameraPosition argument, which is already available, to the new onCameraMove. It may not be on the iOS, so please check

@gabbopalma gabbopalma removed this from the v0.24.0 milestone Oct 2, 2025
@gabbopalma gabbopalma added this to the 0.24.1 milestone Oct 3, 2025
@gabbopalma gabbopalma changed the base branch from main to release-0.24.1 October 16, 2025 07:50
@gabbopalma gabbopalma merged commit 15e4db4 into maplibre:release-0.24.1 Oct 16, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants