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:

Returns:

void

Exceptions

An exception if it fails.