$file static method
Wrapper for the GeoJsonLayer.file constructor
Implementation
static $Value? $file(Runtime runtime, $Value? thisValue, List<$Value?> args) {
return $GeoJsonLayer.wrap(
GeoJsonLayer.file(
args[0]!.$value,
key: args[1]?.$value,
onPoint: (LatLng point, Map<String, dynamic> properties) {
return (args[2]! as EvalCallable?)?.call(runtime, null, [
$LatLng.wrap(point),
$Map.wrap(properties),
])?.$value;
},
onPolyline: (List<LatLng> points, Map<String, dynamic> properties) {
return (args[3]! as EvalCallable?)?.call(runtime, null, [
$List.view(points, (e) => $LatLng.wrap(e)),
$Map.wrap(properties),
])?.$value;
},
onPolygon:
(
List<LatLng> points,
List<List<LatLng>>? holes,
Map<String, dynamic> properties,
) {
return (args[4]! as EvalCallable?)?.call(runtime, null, [
$List.view(points, (e) => $LatLng.wrap(e)),
if (holes == null)
const $null()
else
$List.view(
holes,
(e) => $List.view(e, (e) => $LatLng.wrap(e)),
),
$Map.wrap(properties),
])?.$value;
},
filter: (String geometryType, Map<String, dynamic> properties) {
return (args[5]! as EvalCallable?)?.call(runtime, null, [
$String(geometryType),
$Map.wrap(properties),
])?.$value;
},
styleDefaults: args[6]?.$value,
hitNotifier: args[7]?.$value,
polylineHitbox: args[8]?.$value ?? 10,
),
);
}