Closed berkayoruc closed 3 years ago
Hi @berkayoruc, no I haven't had this problem. If you give a minimal example that demonstrates the issues I can have a look.
You can see the code here.
Thanks @berkayoruc . So changing state (by calling mapcontroller.move) should not be done in a builder. It should happen as a result of a tap or something else since otherwise you can end up in a build loop which is possibly what's happening here: the popup builds which calls move and thus the popup builds again and calls move again etc etc.
Can you describe what functionality you're hoping to achieve? Maybe that the map moves to the marker when the marker is tapped?
Oh, thank you for explanation. I want to change center of map to tapped marker coordinates.
No problem :). I've just uploaded a new version (1.0.1
) which adds a new option, markerCenterAnimation
. For backwards compatibility the markers are not centered on tap by default, so you just need to add that option as follows:
PopupMarkerLayerWidget(
options: PopupMarkerLayerOptions(
markerCenterAnimation: MarkerCenterAnimation(), // Note: You can specify a custom duration/curve if you want
// ...
),
// ...
)
So, we can close issue. Thak you so much😄
Hi guys. If popup snap on map and popup ontap runs mapcontroller.move function, after that I cannot move anywhere on map. Did you ever face this problem?