fromLatLng static method
FormattedLocation
fromLatLng({
- required double lat,
- required double lon,
- String placeId = '',
- String addressType = '',
- String category = '',
- String licence = '',
- String type = '',
- String name = '',
- String osmType = '',
- String? displayName,
- String? icon,
- Address address = const Address(),
- Map<
String, String> names = const {}, - Map<
String, String> extratags = const {}, - Map<
String, String> namedetails = const {}, - LatLngBounds? boundingBox,
- GeoGeometry? geojson,
- double importance = 0,
- int placeRank = 0,
- int osmId = 0,
Implementation
static FormattedLocation fromLatLng({
required double lat,
required double lon,
String placeId = '',
String addressType = '',
String category = '',
String licence = '',
String type = '',
String name = '',
String osmType = '',
String? displayName,
String? icon,
Address address = const Address(),
Map<String, String> names = const {},
Map<String, String> extratags = const {},
Map<String, String> namedetails = const {},
LatLngBounds? boundingBox,
GeoGeometry? geojson,
double importance = 0,
int placeRank = 0,
int osmId = 0,
}) {
return FormattedLocation(
placeId: placeId,
address: address,
lat: lat,
lon: lon,
addressType: addressType,
boundingBox: boundingBox,
category: category,
displayName: displayName ?? '$lat, $lon',
extratags: extratags,
geojson: geojson ??
GeoGeometry.point(
LatLng(lat, lon),
Color((math.Random().nextDouble() * 0xFFFFFF).toInt())
.withOpacity(1.0),
),
importance: importance,
licence: licence,
name: name,
namedetails: namedetails,
osmId: osmId,
osmType: osmType,
placeRank: placeRank,
type: type,
icon: icon,
);
}