Skip to content

Commit

Permalink
Fix cluster roration and publish version 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lpongetti committed Oct 27, 2023
1 parent 67f1b0c commit f4489db
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
## [1.3.0] - 10/11/2023
## [1.3.1] - 27/10/2023

- Fix cluster rotation
- Merge pull request #194 from shrijanRegmi/master
- Merge pull request #192 from marselisborgit/master
- Merge pull request #182 from starshipcoder/dev-rebuild-issue

## [1.3.0] - 11/10/2023

- Merge pull request #188 from altotunchitoo:flutter_map-6
- Merge pull request #184 from shrijanRegmi/master
Expand Down
42 changes: 42 additions & 0 deletions lib/src/marker_cluster_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ class _MarkerClusterLayerState extends State<MarkerClusterLayer>
size: markerNode.parent!.size(),
animationController: _zoomController,
translate: StaticTranslate(_mapCalculator, markerNode.parent!),
rotate: widget.options.rotate != true
? null
: Rotate(
angle: -widget.mapCamera.rotationRad,
alignment: widget.options.alignment,
),
fade: Fade.fadeOut,
child: ClusterWidget(
cluster: markerNode.parent!,
Expand All @@ -326,6 +332,12 @@ class _MarkerClusterLayerState extends State<MarkerClusterLayer>
key: ObjectKey(clusterNode),
size: clusterNode.size(),
translate: StaticTranslate(_mapCalculator, clusterNode),
rotate: widget.options.rotate != true
? null
: Rotate(
angle: -widget.mapCamera.rotationRad,
alignment: widget.options.alignment,
),
child: ClusterWidget(
cluster: clusterNode,
builder: widget.options.builder,
Expand All @@ -345,6 +357,12 @@ class _MarkerClusterLayerState extends State<MarkerClusterLayer>
animationController: _zoomController,
translate: StaticTranslate(_mapCalculator, clusterNode),
fade: Fade.fadeIn,
rotate: widget.options.rotate != true
? null
: Rotate(
angle: -widget.mapCamera.rotationRad,
alignment: widget.options.alignment,
),
child: ClusterWidget(
cluster: clusterNode,
builder: widget.options.builder,
Expand Down Expand Up @@ -382,6 +400,12 @@ class _MarkerClusterLayerState extends State<MarkerClusterLayer>
from: child,
to: clusterNode,
),
rotate: widget.options.rotate != true
? null
: Rotate(
angle: -widget.mapCamera.rotationRad,
alignment: widget.options.alignment,
),
fade: Fade.fadeOut,
child: ClusterWidget(
cluster: child,
Expand Down Expand Up @@ -410,6 +434,12 @@ class _MarkerClusterLayerState extends State<MarkerClusterLayer>
from: clusterNode,
to: clusterNode.parent!,
),
rotate: widget.options.rotate != true
? null
: Rotate(
angle: -widget.mapCamera.rotationRad,
alignment: widget.options.alignment,
),
fade: Fade.fadeIn,
child: ClusterWidget(
cluster: clusterNode,
Expand All @@ -422,6 +452,12 @@ class _MarkerClusterLayerState extends State<MarkerClusterLayer>
size: clusterNode.parent!.size(),
animationController: _zoomController,
translate: StaticTranslate(_mapCalculator, clusterNode.parent!),
rotate: widget.options.rotate != true
? null
: Rotate(
angle: -widget.mapCamera.rotationRad,
alignment: widget.options.alignment,
),
fade: Fade.fadeOut,
child: ClusterWidget(
cluster: clusterNode.parent!,
Expand All @@ -441,6 +477,12 @@ class _MarkerClusterLayerState extends State<MarkerClusterLayer>
size: cluster.size(),
animationController: _spiderfyController,
translate: StaticTranslate(_mapCalculator, cluster),
rotate: widget.options.rotate != true
? null
: Rotate(
angle: -widget.mapCamera.rotationRad,
alignment: widget.options.alignment,
),
fade: Fade.almostFadeOut,
child: ClusterWidget(
cluster: cluster,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: flutter_map_marker_cluster
description: A Dart implementation of Leaflet.makercluster for Flutter apps.
Provides beautiful animated marker clustering functionality for flutter_map.
version: 1.3.0
version: 1.3.1

homepage: https://github.com/lpongetti/flutter_map_marker_cluster

Expand Down

0 comments on commit f4489db

Please sign in to comment.