Home > @magiclane/maps-sdk > GemView > centerOnArea
GemView.centerOnArea() method
Center the view on the given WGS area
Signature:
centerOnArea(area: RectangleGeographicArea, options?: {
zoomLevel?: number;
screenPosition?: Point | null;
animation?: GemAnimation | null;
}): void;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
area |
Geographic area | |
|
options |
{ zoomLevel?: number; screenPosition?: Point | null; animation?: GemAnimation | null; } |
(Optional) Options for centering. |
options properties:
- Optional zoomLevel?: number
Zoom level. When -1 is used, the zoom level is automatically selected so that the entire area is visible on the map.
- Optional screenPosition?: Point | null
Screen position where the coordinates should project (default uses the specified cursor coordinates). The coordinates are relative to the parent view screen.
- Optional animation?: GemAnimation | null
Specifies the animation to be used by the operation.
Returns:
void
Exceptions
An exception if it fails.