generateImageUrl method

String generateImageUrl({
  1. required LatLng position,
  2. required double heading,
  3. required double pitch,
})

Generates the Street View static image URL

Implementation

String generateImageUrl({
  required LatLng position,
  required double heading,
  required double pitch,
}) {
  return 'https://maps.googleapis.com/maps/api/streetview'
      '?size=${imageWidth}x$imageHeight'
      '&location=${position.latitude},${position.longitude}'
      '&heading=$heading'
      '&pitch=$pitch'
      '&key=$apiKey';
}