Reputation: 127
I want to trigger else block in this method while the user is navigating the maps with the pan gesture.
void setTracking(bool isTracking) {
if (isTracking) {
_visualNavigator.cameraMode = CameraTrackingMode.enabled;
} else {
_visualNavigator.cameraMode = CameraTrackingMode.disabled;
}
}
In this way, the user will be able to look at other places on the map while using the navigation. How can I do that?
Upvotes: 0
Views: 199
Reputation: 127
Here is the solution;
void _trackingOffOnPanGesture(){
_hereMapController.gestures.panListener = PanListener((state, origin, translation, velocity) {
_visualNavigator!.cameraMode = CameraTrackingMode.disabled;
});
}
Upvotes: 1