setTrafficVisibility method
- bool isVisible
Set traffic visibility.
Parameters
isVisible: True to show traffic, false to hide it.
Returns
- GemError.success if the operation is successful.
- GemError.notFound if the current map style doesn't contain a traffic layer.
Implementation
GemError setTrafficVisibility(final bool isVisible) {
final OperationResult resultString = objectMethod(
_pointerId,
'MapViewPreferences',
'setTrafficVisibility',
args: isVisible,
dependencyId: _mapPointerId,
);
return GemErrorExtension.fromCode(resultString['result']);
}