getNearestLocations method
- Coordinates coords, {
- List<
int> lmkStoreTypesIds = const <int>[], - int radius = 0,
Retrieve the set of landmarks on the specified coordinates.
This is a quick synchronous reverse geocoding method. Only works when the coordinates are in the current map view area.
Supported landmark stores are LandmarkStoreType.mapAddress, LandmarkStoreType.mapPoi, LandmarkStoreType.mapCity.
Parameters
- IN coords Reference Coordinates for this operation.
- IN lmkStoreTypesIds A list of landmark store types where to search for locations, see LandmarkStoreType. If empty, all landmark stores will be searched
- IN radius The search radius in meters, If 0, an optimal default value will be internally used.
Returns
A Landmark list containing the nearest locations to the specified coordinates. If no landmarks are found, the list will be empty.
Implementation
List<Landmark> getNearestLocations(Coordinates coords,
{List<int> lmkStoreTypesIds = const <int>[], int radius = 0}) {
final OperationResult resultString = objectMethod(
_pointerId,
'MapView',
'getNearestLocations',
args: <String, Object>{
'coords': coords,
'intList': lmkStoreTypesIds.isNotEmpty
? lmkStoreTypesIds
: <dynamic, dynamic>{},
'radius': radius
},
);
return LandmarkList.init(resultString['result']).toList();
}