You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+85-2Lines changed: 85 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ in an unbounded widget will cause the application to throw a Flutter exception.
95
95
96
96
You can also add a bare GoogleMapsMapView that works as a normal map view without navigation functionality.
97
97
98
-
### Add a navigation view
98
+
### Add a navigation view and start a navigation session
99
99
100
100
```dart
101
101
import 'package:flutter/material.dart';
@@ -199,7 +199,7 @@ This parameter has only an effect on Android.
199
199
200
200
```
201
201
202
-
####Using Map IDs
202
+
### Using Map IDs
203
203
You can configure your map by providing a `mapId` parameter during map initialization. Map IDs are created in the [Google Cloud Console](https://console.cloud.google.com/google/maps-apis/studio/maps) and allow you to [enable various Google Maps Platform features](https://developers.google.com/maps/documentation/android-sdk/map-ids/mapid-over#features-available), such as cloud-based map styling.
The SDK provides two different settings to control the appearance of maps and navigation UI: `mapColorScheme` and `forceNightMode`. Which setting to use depends on whether navigation UI is enabled or disabled.
268
+
269
+
These settings can be configured both during initialization and dynamically changed after initialization using the view controllers.
270
+
271
+
#### For Navigation Views (GoogleMapsNavigationView)
272
+
273
+
**When navigation UI is enabled:**
274
+
- Use `forceNightMode` (or `initialForceNightMode` during initialization) to control both the navigation UI elements and the map tile colors.
275
+
- The `mapColorScheme` setting is ignored when navigation UI is enabled.
276
+
277
+
> [!TIP]
278
+
> When navigation guidance is running, it's recommended to use `NavigationForceNightMode.auto` (the default). This allows the Navigation SDK to automatically determine the appropriate day or night mode based on the user's location and local time, which may differ from the device's system settings.
-`auto` (default and recommended) - SDK determines day/night mode based on user's location and local time
341
+
-`forceDay` - Force day mode regardless of time or location
342
+
-`forceNight` - Force night mode regardless of time or location
343
+
-`MapColorScheme`:
344
+
-`followSystem` (default) - Follow device system settings
345
+
-`light` - Force light color scheme
346
+
-`dark` - Force dark color scheme
347
+
265
348
## Support for Android Auto and Apple CarPlay
266
349
This plugin is compatible with both Android Auto and Apple CarPlay infotainment systems. For more details, please refer to the respective platform documentation:
0 commit comments