getMapLaunchUri static method

Uri getMapLaunchUri(
  1. double latitude,
  2. double longitude
)

Generates a Google Maps launch URI based on the provided latitude and longitude coordinates.

@param latitude The latitude coordinate. @param longitude The longitude coordinate. @return A Uri representing the Google Maps URI for launching the map at the specified location.

Implementation

static Uri getMapLaunchUri(double latitude, double longitude) {
  return Uri.parse(
      'https://www.google.com/maps/search/?api=1&query=$latitude, $longitude');
}