GeoJsonLayer constructor
const
GeoJsonLayer({
- Key? key,
- required GeoJsonProvider data,
- OnPointCallback? onPoint,
- OnPolylineCallback? onPolyline,
- OnPolygonCallback? onPolygon,
- FeatureFilterCallback? filter,
- GeoJsonStyleDefaults? styleDefaults,
- LayerHitNotifier<
Object> ? hitNotifier, - double polylineHitbox = 10,
Creates a layer instance. You might be better off using a specialized constructor:
- GeoJsonLayer.memory for already loaded data.
- GeoJsonLayer.file for loading GeoJSON from files.
- GeoJsonLayer.asset for GeoJSON files bundled in assets.
- GeoJsonLayer.network for downloading GeoJSON files over the network.
Implementation
const GeoJsonLayer({
super.key,
required this.data,
this.onPoint,
this.onPolyline,
this.onPolygon,
this.filter,
this.styleDefaults,
this.hitNotifier,
this.polylineHitbox = 10,
});