setMapStyleById method
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:
- setMapStyle - Set style using ContentStoreItem.
- setMapStyleByPath - Set style by file path.
- mapStyleId - Get current style ID.
Implementation
void setMapStyleById(final int id, {final bool smoothTransition = false}) {
objectMethod(
_pointerId,
'MapViewPreferences',
'setMapStyleById',
args: <String, Object>{'id': id, 'smoothTransition': smoothTransition},
dependencyId: _mapPointerId,
);
}