hasWikiInfo method

bool hasWikiInfo(
  1. Landmark landmark
)

Checks if the landmark has Wikipedia info

Requests all the wikipedia info at once (page title/url, page summary, and list of pictures - only urls of the pictures) - returns true if request successfully made, false if something went wrong. ProgressListener will notifyComplete with GemError.success once all the results are received from the Wikipedia API. It will request the info in the language of the device, and will fallback to English if a page in the main language doesn't exist. If neither the main language nor the English version exist, ProgressListener will notifyComplete with GemError.general, and the request will be canceled.

Parameters

  • IN landmark Landmark for which the check will be done.

Returns

  • True if the landmark has Wikipedia info, false otherwise

Throws

  • An exception if it fails.

Implementation

bool hasWikiInfo(final Landmark landmark) {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'ExternalInfo',
    'hasWikiInfo',
    args: landmark.pointerId,
  );

  return resultString['result'];
}