setMapStyleById method

void setMapStyleById(
  1. int id, {
  2. bool smoothTransition = false,
})

Set map view style by content id.

Applies a map style using its content store identifier. This is useful when you know the style ID but don't have a ContentStoreItem object. Optionally enable smooth transitions to animate between styles.

Parameters

  • id: (int) Content id (see ContentStoreItem.id).
  • smoothTransition: (bool) When true, animates the transition between styles.

See also:

Implementation

void setMapStyleById(final int id, {final bool smoothTransition = false}) {
  objectMethod(
    _pointerId,
    'MapViewPreferences',
    'setMapStyleById',
    args: <String, Object>{'id': id, 'smoothTransition': smoothTransition},
    dependencyId: _mapPointerId,
  );
}