flutter_map_geojson2 library

Classes

AssetGeoJson
FileGeoJson
GeoJsonLayer
Creates a layer that displays contents of a GeoJSON source.
GeoJsonProvider
Identifies a GeoJSON file without having the actual data.
GeoJsonStyleDefaults
Default values for default object builders. Functions defaultOnPoint, defaultOnPolyline, and defaultOnPolygon use values from this object for properties missing in GeoJSON objects.
MemoryGeoJson
NetworkGeoJson

Functions

defaultOnPoint(LatLng point, Map<String, dynamic> props, {GeoJsonStyleDefaults? defaults}) → Marker
Default implementation for GeoJsonLayer.onPoint. Parses object properties to determine marker style. Those properties are supported:
defaultOnPolygon(List<LatLng> points, List<List<LatLng>>? holes, Map<String, dynamic> props, {GeoJsonStyleDefaults? defaults}) → Polygon<Object>
Default implementation for GeoJsonLayer.onPolygon. Parses object properties to determine polygon style. Those properties are supported:
defaultOnPolyline(List<LatLng> points, Map<String, dynamic> props, {GeoJsonStyleDefaults? defaults}) → Polyline<Object>
Default implementation for GeoJsonLayer.onPolyline. Parses object properties to determine polyline style. Those properties are supported:

Typedefs

FeatureFilterCallback = bool Function(String geometryType, Map<String, dynamic> properties)
A filtering function that receives a GeoJSON object geometryType (can be "Point", "LineString" etc) and its properties. Return false to skip the object.
OnPointCallback = Marker Function(LatLng point, Map<String, dynamic> properties)
A callback function that creates a Marker instance from a point geometry and GeoJSON object properties.
OnPolygonCallback = Polygon<Object> Function(List<LatLng> points, List<List<LatLng>>? holes, Map<String, dynamic> properties)
A callback function that creates a Polygon instance from points that make up the outer ring, a list of holes, and GeoJSON object properties.
OnPolylineCallback = Polyline<Object> Function(List<LatLng> points, Map<String, dynamic> properties)
A callback function that creates a Polyline instance from points making up the line, and GeoJSON object properties.

Exceptions / Errors

GeoJsonLoadException
NotAGeoJson