App Crashes while setting Navigation View #265
Labels
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
status: investigating
The issue is under investigation, which is determined to be non-trivial.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
App Crashed.
enabled maps sdk, for android and navigations api both
using android 11 for testing
working fine with your navigation app
i am using only for Android
pls help me what wrong i am doing
Code example
while setting view like this Future _initializeNavigationSession() async {
if (!await GoogleMapsNavigator.areTermsAccepted()) {
await GoogleMapsNavigator.showTermsAndConditionsDialog(
'My App',
'Logistics solutions',
);
}
await GoogleMapsNavigator.initializeNavigationSession();
setState(() {
_navigationSessionInitialized = true;
});
}
void _onViewCreated(GoogleNavigationViewController controller) async{
navigationViewController = controller;
await controller.setMyLocationEnabled(true);
await controller.setNavigationUIEnabled(true);
await GoogleMapsNavigator.setDestinations(Destinations(
waypoints: _waypoints,
displayOptions: NavigationDisplayOptions(
showDestinationMarkers: false,
showStopSigns: true,
showTrafficLights: true,
),
routingOptions: RoutingOptions(travelMode: NavigationTravelMode.driving),));
}
@OverRide
Widget build(BuildContext context) {
return Scaffold(
body: curentLocation == null
? Center(
child: utils.iosProgressIndicator(AppColors.primaryThemeColor),
)
: SafeArea(
child: Stack(children: [
_navigationSessionInitialized ?
GoogleMapsNavigationView(
gestureRecognizers:Set()
..add(Factory(
() => PanGestureRecognizer()))
..add(Factory(
() => ScaleGestureRecognizer())) ,
onViewCreated: _onViewCreated,
initialMapType: MapType.normal,
initialNavigationUIEnabledPreference: NavigationUIEnabledPreference.automatic,
initialCameraPosition: CameraPosition(
target: curentLocation!,
zoom: 14,
),
):Center(child: utils.iosProgressIndicator(AppColors.primaryThemeColor),),
Following these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered: