centerOnRouteTrafficEvent method
- RouteTrafficEvent routeTrafficEvent, {
- double zoomLevel = -1,
- Rectangle<
int> rectangle = const Rectangle<int>(0, 0, 0, 0), - double? viewAngle,
- GemAnimation? animation,
Center on the given traffic event
Parameters
- IN routeTrafficEvent RouteTrafficEvent to be shown.
- IN zoomLevel Zoom level (Use -1 for automatic selection)
- IN rectangle Screen rectangle where area should be centered. The coordinates are relative to view parent screen.
- IN viewAngle Specifies the map pitch angle.
- IN animation Specifies the animation to be used by the operation.
Throws
- An exception if it fails.
Implementation
void centerOnRouteTrafficEvent(
RouteTrafficEvent routeTrafficEvent, {
final double zoomLevel = -1,
final Rectangle<int> rectangle = const Rectangle<int>(0, 0, 0, 0),
final double? viewAngle,
final GemAnimation? animation,
}) {
objectMethod(
_pointerId,
'MapView',
'centerOnRouteTrafficEvent',
args: <String, Object>{
'traffic': routeTrafficEvent.pointerId,
'zoomLevel': zoomLevel,
'rc': RectType<int>.fromRectangle(rectangle),
if (viewAngle != null) 'viewAngle': viewAngle,
if (animation != null) 'animation': animation,
},
);
}