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

Route to be shown.

{ screenRect, animation, }

(not declared)

(Optional)

input

{ screenRect?: RectType<number>; animation?: GemAnimation; }

(Optional)

input properties:

Returns:

void

Exceptions

An exception if it fails.