geocode method
Translate placeId
into LatLngInfo
coords
Implementation
Future<LatLng> geocode(String placeId) async {
final data = await _apiRequest('geocode/json',
queryParameters: {'place_id': placeId});
final results = data['results'] as Iterable;
final location = results.elementAt(0)['geometry']['location'];
return LatLng(location['lat'] as double, location['lng'] as double);
}