Skip to main content
The SDK enables you to fully style your map, by providing various APIs to change the style mode, container, and even provide your own custom styles.
Assure the map is ready before changing the style. Learn more.

Updating Style Mode

Use the MapManager class to update your map to main or dark mode:
// set to dark mode
await mapManager.setMapStyleMode(MapManagerStyleMode.dark);

// set to main mode
await mapManager.setMapStyleMode(MapManagerStyleMode.main);

// set to satellite style
await mapManager.setMapStyleContainer(MapManagerStyleContainer.satelliteStyle);

Style Containers

Style containers change the style of the map with pre-defined styles.
// default style
await mapManager.setMapStyleContainer(MapManagerStyleContainer.defaultStyle);

// set to satellite style
await mapManager.setMapStyleContainer(MapManagerStyleContainer.satelliteStyle);

// set to driving style, reduces performance overhead and makes it safer for driving conditions
await mapManager.setMapStyleContainer(MapManagerStyleContainer.drivingStyle);

// shows driving restrictions in map (such as clearance height for bridges and tunnels)
await mapManager.setMapStyleContainer(MapManagerStyleContainer.restrictionsStyle);

Custom Style Container

To use a custom style container beyond the ones listed above, provide the light and main variants:
await mapManager.setMapStyleCustomContainer(
  MapManagerCustomStyleContainer(
    darkStyleUrl: '/path/to/style/dark.json',
    mainStyleUrl: '/path/to/style/main.json',
  ),
);
We recommend the path_provider package to help you generate the appropriate paths.

Traffic Visibility

Enable or disable traffic:
await mapManager.setMapStyleTrafficVisibility(true);

Traffic Incidents Visibility

Enable or disable traffic incidents:
await mapManager.setMapStyleTrafficIncidentsVisibility(true);

Layers

Show or hide layers spcified in your style spec with:
await mapManager.showLayer('roads');
await mapManager.hideLayer('roads');
You can also check if a layer is currently visible with:
await mapManager.isLayerVisible('roads');
Assure the map style is loaded before updating a layer’s visibility. Learn more.