Skip to content

Commit

Permalink
[CP] Fix annotation click listeneres (#776)
Browse files Browse the repository at this point in the history
* Fix annotation listeners

* add changelog entry
  • Loading branch information
evil159 authored Nov 18, 2024
1 parent be63fee commit c101d05
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
> [!IMPORTANT]
> Configuring Mapbox's secret token is no longer required when installing our SDKs.
### 2.4.1

* Fix annotation click listeners not working.

### 2.4.0

* Update Maps SDK to 11.8.0
Expand Down
4 changes: 3 additions & 1 deletion lib/src/annotation/circle_annotation_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ class CircleAnnotationManager extends BaseAnnotationManager {
required String channelSuffix})
: _annotationMessenger = _CircleAnnotationMessenger(
binaryMessenger: messenger, messageChannelSuffix: channelSuffix),
_channelSuffix = channelSuffix,
super._();

final _CircleAnnotationMessenger _annotationMessenger;
final String _channelSuffix;

/// Add a listener to receive the callback when an annotation is clicked.
void addOnCircleAnnotationClickListener(
OnCircleAnnotationClickListener listener) {
OnCircleAnnotationClickListener.setUp(listener,
binaryMessenger: _messenger);
binaryMessenger: _messenger, messageChannelSuffix: _channelSuffix);
}

/// Create a new annotation with the option.
Expand Down
5 changes: 4 additions & 1 deletion lib/src/annotation/point_annotation_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ class PointAnnotationManager extends BaseAnnotationManager {
required String channelSuffix})
: _annotationMessenger = _PointAnnotationMessenger(
binaryMessenger: messenger, messageChannelSuffix: channelSuffix),
_channelSuffix = channelSuffix,
super._();

final _PointAnnotationMessenger _annotationMessenger;
final String _channelSuffix;

/// Add a listener to receive the callback when an annotation is clicked.
void addOnPointAnnotationClickListener(
OnPointAnnotationClickListener listener) {
OnPointAnnotationClickListener.setUp(listener, binaryMessenger: _messenger);
OnPointAnnotationClickListener.setUp(listener,
binaryMessenger: _messenger, messageChannelSuffix: _channelSuffix);
}

/// Create a new annotation with the option.
Expand Down
4 changes: 3 additions & 1 deletion lib/src/annotation/polygon_annotation_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ class PolygonAnnotationManager extends BaseAnnotationManager {
required String channelSuffix})
: _annotationMessenger = _PolygonAnnotationMessenger(
binaryMessenger: messenger, messageChannelSuffix: channelSuffix),
_channelSuffix = channelSuffix,
super._();

final _PolygonAnnotationMessenger _annotationMessenger;
final String _channelSuffix;

/// Add a listener to receive the callback when an annotation is clicked.
void addOnPolygonAnnotationClickListener(
OnPolygonAnnotationClickListener listener) {
OnPolygonAnnotationClickListener.setUp(listener,
binaryMessenger: _messenger);
binaryMessenger: _messenger, messageChannelSuffix: _channelSuffix);
}

/// Create a new annotation with the option.
Expand Down
4 changes: 3 additions & 1 deletion lib/src/annotation/polyline_annotation_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ class PolylineAnnotationManager extends BaseAnnotationManager {
required String channelSuffix})
: _annotationMessenger = _PolylineAnnotationMessenger(
binaryMessenger: messenger, messageChannelSuffix: channelSuffix),
_channelSuffix = channelSuffix,
super._();

final _PolylineAnnotationMessenger _annotationMessenger;
final String _channelSuffix;

/// Add a listener to receive the callback when an annotation is clicked.
void addOnPolylineAnnotationClickListener(
OnPolylineAnnotationClickListener listener) {
OnPolylineAnnotationClickListener.setUp(listener,
binaryMessenger: _messenger);
binaryMessenger: _messenger, messageChannelSuffix: _channelSuffix);
}

/// Create a new annotation with the option.
Expand Down

0 comments on commit c101d05

Please sign in to comment.