Home > @magiclane/maps-sdk > ExternalInfoService > requestWikiInfo

ExternalInfoService.requestWikiInfo() method

Requests Wikipedia info for a landmark via the public Wikipedia API (no WASM).

Signature:

static requestWikiInfo(landmark: Landmark, onComplete: (err: GemError, extraInfo: ExternalInfo | null) => void): EventHandler | null;

Parameters

Parameter

Type

Description

landmark

Landmark

Landmark for which the request will be done.

onComplete

(err: GemError, extraInfo: ExternalInfo | null) => void

Callback triggered after the request is done. - GemError.success with the external info object on success. - GemError.invalidInput with null if the landmark has no Wikipedia seed. - GemError.notFound with null if no Wikipedia article matched. - GemError.general with null on other errors.

Returns:

EventHandler | null

An EventHandler that can be used to cancel the request, or null if the landmark has no Wikipedia info.