getHighlight method

List<Landmark> getHighlight(
  1. int highlightId
)

Retrieves the landmarks in a highlighted collection.

Returns the list of landmarks that were activated for the specified highlight collection. This only returns landmarks if the collection was activated with HighlightRenderSettings containing HighlightOptions.showLandmark. Otherwise, the result will be an empty list.

Parameters

  • highlightId: The ID of the highlight collection whose landmarks to retrieve

Returns

  • List of Landmark objects in the specified highlight collection, or an empty list if the collection doesn't exist or wasn't configured to show landmarks

See also:

Implementation

List<Landmark> getHighlight(int highlightId) {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'MapView',
    'getHighlight',
    args: highlightId,
  );

  final LandmarkList landmarkList = LandmarkList.init(resultString['result']);

  return landmarkList.toList();
}