lpongetti/flutter_map_marker_cluster

When opening a popup the map position is moved to a random place

GPaolo opened this issue · 2 comments

This happens whenever I click on a marker to open the popup.
Rather than the map being centered on the marker, it is moved to a random place.

marker

Here is a gif of it happening when I click on the small marker on the right of the current position

I found the issue. In marker_cluster_layer, line 646, there is this code

final latTween =
          Tween<double>(begin: center.latitude, end: marker.point.latitude);
final lonTween =
          Tween<double>(begin: center.longitude, end: marker.point.longitude + 20);

The '+ 20' should not be there. I will make a pull request solving it