GeoPoint.fromMap constructor

GeoPoint.fromMap(
  1. Map<String, double> map
)

Creates a GeoPoint from a map containing 'latitude' and 'longitude' keys.

Example:

final map = {'latitude': 37.7749, 'longitude': -122.4194};
final point = GeoPoint.fromMap(map);

Implementation

factory GeoPoint.fromMap(Map<String, double> map) {
  return GeoPoint(
    latitude: map['latitude']!,
    longitude: map['longitude']!,
  );
}