getUrl method
Implementation
String getUrl() {
final params = <String, String>{};
if (path != null) {
params['path'] = path.toString();
}
if (markers.isNotEmpty) {
params['markers'] = markers.join('|');
}
final z = zoom;
if (z != null && z.isNotEmpty) {
params['zoom'] = z;
}
if (scale) {
params['scale'] = scale.toString();
}
final c = center;
if (c != null && c.isNotEmpty) {
params['center'] = c;
}
params.addAll({
'key': _apiKey,
'size': size,
'mapType': mapType,
});
return Uri(
scheme: 'https',
host: 'maps.googleapis.com',
path: 'maps/api/staticmap',
queryParameters: params,
).toString();
}