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

GemView.getClosestAddressLandmark() method

Get the closest address landmark near the provided coordinates.

Signature:

getClosestAddressLandmark(params: {
        coords: Coordinates;
        radius: number;
        onlyCity: boolean;
    }): Promise<Landmark | null>;

Parameters

Parameter

Type

Description

params

{ coords: Coordinates; radius: number; onlyCity: boolean; }

params properties:

  • coords: Coordinates

    Reference coordinates for the search.

  • radius: number

    Search radius in meters.

  • onlyCity: boolean

    True to only search in cities.

Returns:

Promise<Landmark | null>

The closest address landmark or null if none is found.

Exceptions

An exception if it fails.