Home > @magiclane/maps-sdk > GemView > centerOnRoute
GemView.centerOnRoute() method
Center on the given route.
The zoom level is automatically selected so that the entire route is visible on the map.
Signature:
centerOnRoute(route: Route, input?: {
screenRect?: RectType<number>;
animation?: GemAnimation;
}): void;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
route |
Route to be shown. | |
|
{ screenRect, animation, } |
(not declared) |
(Optional) |
|
input |
{ screenRect?: RectType<number>; animation?: GemAnimation; } |
(Optional) |
input properties:
- Optional screenRect?: RectType
- Optional animation?: GemAnimation
Returns:
void
Exceptions
An exception if it fails.