centerOnRouteInstruction method
- RouteInstruction routeInstruction, {
- double zoomLevel = -1,
- Point<
int> screenPosition = const Point<int>(0, 0), - double? viewAngle,
- GemAnimation? animation,
Center on the given route instruction.
The route instruction turn arrow will be visible on the map.
Parameters
- IN routeInstruction Routing instruction
- IN zoomLevel Zoom level (Use -1 for automatic selection)
- IN screenPosition Screen coordinate 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 centerOnRouteInstruction(
final RouteInstruction routeInstruction, {
final double zoomLevel = -1,
final Point<int> screenPosition = const Point<int>(0, 0),
final double? viewAngle,
final GemAnimation? animation,
}) {
objectMethod(
_pointerId,
'MapView',
'centerOnRouteInstruction',
args: <String, Object>{
'instruction': routeInstruction.pointerId,
'zoomLevel': zoomLevel,
'xy': XyType<int>.fromPoint(screenPosition),
if (viewAngle != null) 'viewAngle': viewAngle,
if (animation != null) 'animation': animation,
},
);
}