Home > @magiclane/maps-sdk > GemView > centerOnRoutePart

GemView.centerOnRoutePart() method

Center on the given route part.

The zoom level is automatically selected so that the entire route is visible on the map.

Signature:

centerOnRoutePart(route: Route, startDist: number, endDist: number, input?: {
        screenRect?: RectType<number> | null;
        animation?: GemAnimation | null;
    }): void;

Parameters

Parameter

Type

Description

route

Route

Route to be shown.

startDist

number

Specifies the start distance from route begin.

endDist

number

Specifies the end distance from route begin.

{ screenRect, animation, }

(not declared)

(Optional)

input

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

(Optional)

input properties:

Returns:

void

Exceptions

An exception if it fails.