StreetViewPanoramaLocation.fromMap constructor
StreetViewPanoramaLocation.fromMap(
- dynamic map
Implementation
factory StreetViewPanoramaLocation.fromMap(dynamic map) {
List<StreetViewPanoramaLink>? linksTmp;
LatLng? position;
String? panoId;
if (map != null) {
if (map['links'] != null) {
linksTmp = [];
(map['links'] as List?)?.forEach((e) {
linksTmp!.add(StreetViewPanoramaLink(panoId: e[0], bearing: e[1]));
});
}
position = map['position'][0] != null && map['position'][1] != null
? LatLng(map['position'][0] as double, map['position'][1] as double)
: null;
panoId = map['panoId'] as String?;
}
return StreetViewPanoramaLocation(
links: linksTmp, position: position, panoId: panoId);
}