discoverPlaces method
discoverPlaces returns a List of places near the center of the lat
and lon
given
size
can be given to set the number of results returned by exploreNearbyPlaces
By default the value of size
is set to 20
Implementation
Future<Map<String, dynamic>> discoverPlaces({
required double lat,
required double lon,
int size = 20,
}) async {
assert(size >= 0, "offset can't be negative");
final headers = _createHeader();
final body = _createMap()
..addAll(
{
'at': '$lat,$lon',
'size': size.toString(),
'tf': 'plain',
},
);
var uri = Uri.https('places.ls.hereapi.com', '/places/v1/discover/here', body);
return _callHereApi(uri, headers);
}