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

ExternalInfoService.requestWikiInfo() method

Requests Wikipedia info for a landmark. The result will be provided as an ExternalInfo object.

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 to be triggered after the wikipedia request is done. - Called with GemError.success and the external info object on success. - Called with GemError.invalidInput and null info if the landmark does not have Wikipedia info. - Called with GemError.connection and null info if connection is not available or restricted. - Called with GemError.notFound and null info if wikipedia info is not found for the landmark. - Called with GemError.general and null info on other errors.

Returns:

EventHandler | null

An EventHandler that can be used to cancel the request.

Exceptions

An exception if it fails.