Contents

getPlace(id, options)

Obtains a place using its identifier.

Declaration

getPlace(id: string, options?: PlaceLookupOptions): Promise<Place>;

Parameters

  • id:

    The Place ID that refers to the Place object to fetch.

  • options:

    Options that can overwrite the same options set on the property or that you supplied to the Placelookup constructor. See Placelookupoptions.

Mentioned in

Return Value

A promise that resolves with a Place on success, or rejects with an Error on failure.

Discussion

For information about Places, see Identifying unique locations with Place IDs.

Pass an AbortSignal from an AbortController to the signal option to allow the controller to cancel a pending request. When the controller aborts, the promise it returns rejects with a DOMException whose name is "AbortError".

See Also

Getting a place