getNextAddressDetailLevel static method

List<AddressDetailLevel> getNextAddressDetailLevel(
  1. Landmark landmark
)

Get next possible address detail levels for a Landmark.

The set of next searchable detail levels is country-dependent. For example, a street may expose AddressDetailLevel.crossing and AddressDetailLevel.houseNumber in some countries but AddressDetailLevel.streetSection in others. It is usually passed to search to specify the next level to search.

Parameters

  • landmark: The landmark for which to determine the next searchable detail levels. If the landmark is the default landmark, the returned list will contain only AddressDetailLevel.country.

Returns

Also see:

Implementation

static List<AddressDetailLevel> getNextAddressDetailLevel(
  final Landmark landmark,
) {
  final OperationResult resultString = staticMethod(
    'GuidedAddressSearchService',
    'getNextAddressDetailLevel',
    args: landmark.pointerId,
  );

  final List<int> retList = resultString['result'].whereType<int>().toList();
  return retList
      .map((final int id) => AddressDetailLevelExtension.fromId(id))
      .toList();
}