Home > @magiclane/maps-sdk > GemView > centerOnRoutes
GemView.centerOnRoutes() method
Center on the given routes collection.
All routes from the list will be visible on the map. The zoom level is automatically selected.
Signature:
centerOnRoutes(input?: {
routes?: Route[];
displayMode?: RouteDisplayMode;
screenRect?: RectType<number> | null;
animation?: GemAnimation | null;
}): void;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
{ routes, displayMode, screenRect, animation, } |
(not declared) |
(Optional) |
|
input |
{ routes?: Route[]; displayMode?: RouteDisplayMode; screenRect?: RectType<number> | null; animation?: GemAnimation | null; } |
(Optional) |
input properties:
- Optional routes?: Route[]
- Optional displayMode?: RouteDisplayMode
- Optional screenRect?: RectType
| null - Optional animation?: GemAnimation | null
Returns:
void
Exceptions
An exception if it fails.