baato_maps library

A Flutter package for integrating Baato Maps into Flutter applications.

This package provides widgets and utilities for displaying interactive maps, handling map operations, and integrating with Baato's mapping services.

The main components include:

  • BaatoMapWidget: The core widget for displaying maps
  • BaatoMapController: Controller for map operations
  • Various utility widgets and style configurations
  • Integration with the Baato API for additional services

Classes

Annotation
Represents annotation information for a navigation instruction
AnnotationManager<T extends Annotation>
Manages a homogeneous set of Annotations (e.g. symbols, lines, fills) by owning their backing style source(s)/layer(s) and performing efficient batched updates.
ArgumentCallbacks<T>
Mutable collection of ArgumentCallback instances, itself an ArgumentCallback.
Baato
The main entry point for the Baato package.
BaatoAnnotation
BaatoAPI
Main entry point for the Baato API client
BaatoCameraPosition
A class that represents a camera position for Baato Maps.
BaatoCircleLayerProperties
BaatoCircleOptions
Configuration options for circles on the Baato map.
BaatoCoordinate
Represents a geographic coordinate from the Baato API
BaatoDio
A utility class for handling HTTP requests to the Baato API
BaatoDirectionAPI
BaatoDirectionImpl
BaatoFeatureCollectionGeoJson
A GeoJSON FeatureCollection.
BaatoFillExtrusionLayerProperties
BaatoFillLayerProperties
BaatoFillOptions
Configuration options for fills (polygons) on the Baato map.
BaatoGeoJson
Abstract base class for GeoJSON features.
BaatoGeojsonSourceProperties
Properties for GeoJSON sources in Baato maps
BaatoHeatmapLayerProperties
BaatoHillshadeLayerProperties
BaatoImageSourceProperties
Properties for image sources in Baato maps
BaatoInstruction
Represents a navigation instruction from the Baato API
BaatoLayerProperties
Base interface for all Baato layer properties
BaatoLineGeoJson
A GeoJSON LineString feature.
BaatoLineLayerProperties
BaatoLineOptions
Configuration options for line features in Baato maps.
BaatoMap
A widget that displays a Baato map.
BaatoMapController
Abstract base class for managing Baato map controllers. Base libreController for managing the Baato map.
BaatoMapFeature
Represents a geographic feature on a Baato map.
BaatoMapStyle
Abstract class representing different map styles available in the Baato Maps package.
BaatoMultiLineGeoJson
A GeoJSON MultiLineString feature.
BaatoMultiPointGeoJson
A GeoJSON MultiPoint feature.
BaatoMultiPolygonGeoJson
A GeoJSON MultiPolygon feature.
BaatoPlace
A class representing a place from the Baato API.
BaatoPlaceAPI
Interface for interacting with Baato Place API endpoints
BaatoPlaceAutoSuggestion
A widget that provides place search auto-suggestions using Baato's place search API.
BaatoPlaceImpl
Implementation of the BaatoPlace for interacting with Baato Place API
BaatoPlaceResponse
Response object for place search queries from the Baato API.
BaatoPlaceSearchDropdown<T>
A widget that provides a search field with auto-suggestion dropdown for places.
BaatoPointGeoJson
A GeoJSON Point feature.
BaatoPolygonGeoJson
A GeoJSON Polygon feature.
BaatoRasterDemSourceProperties
Properties for raster DEM (Digital Elevation Model) sources in Baato maps
BaatoRasterLayerProperties
BaatoRasterSourceProperties
Properties for raster tile sources in Baato maps
BaatoReverse
A class to interact with Baato Reverse Geocoding API
BaatoRoute
Represents a route from the Baato API
BaatoRouteProperties
A class that represents the properties of a Baato route.
BaatoRouteResponse
Represents a response from the Baato route API
BaatoSearch
A class to interact with Baato Search API
BaatoSearchPlace
Represents a search result place from the Baato API
BaatoSearchPlaceResponse
Represents a response from the Baato search API
BaatoSourceProperties
Base interface for all Baato source properties
BaatoStartEndPlaceSearchDropdown<T>
A widget that provides a search interface for route planning with start, end, and optional midpoint locations.
BaatoSymbolLayerProperties
Symbol layer properties for Baato maps
BaatoSymbolOption
Configuration options for Baato map symbols.
BaatoUtils
A utility class for Baato API operations
BaatoVectorSourceProperties
Properties for vector tile sources in Baato maps
BaatoVideoSourceProperties
Properties for video sources in Baato maps
CameraPosition
The position of the map "camera", the view point from which the world is shown in the map view. Aggregates the camera's target geographical location, its zoom level, tilt angle, and bearing.
CameraTargetBounds
Bounds for the map camera target. Used with MapLibreMapOptions to wrap a LatLngBounds value. This allows distinguishing between specifying an unbounded target (null LatLngBounds) from not specifying anything (null CameraTargetBounds).
CameraUpdate
Defines a camera move, supporting absolute moves as well as moves relative the current position.
Circle
CircleLayerProperties
CircleManager
CircleOptions
Configuration options for Circle instances.
DownloadRegionStatus
Error
Expressions
ExtraInfoJSON
Represents extra information for a navigation instruction
Fill
FillExtrusionLayerProperties
FillLayerProperties
FillManager
FillOptions
Configuration options for Fill instances.
GeoCoord
Represents a geographic coordinate with latitude and longitude.
GeojsonSourceProperties
Geometry
Represents the geometric shape of a place.
HeatmapLayerProperties
HillshadeLayerProperties
ImageSourceProperties
InProgress
LatLng
A pair of latitude and longitude coordinates, stored as degrees.
LatLngBounds
A latitude/longitude aligned rectangle.
LatLngQuad
A geographical area representing a non-aligned quadrilateral This class does not wrap values to the world bounds
LayerProperties
Line
LineLayerProperties
LineManager
LineOptions
Configuration options for Line instances.
LocationEnginePlatforms
Location engine properties that apply across all platforms.
MapLibreMap
Shows a MapLibre map. Also refer to the documentation of maplibre_gl and MapLibreMapController.
MapLibreMapController
Controller for a single MapLibreMap instance running on the host platform.
MapLibreMapOptions
Configuration options for the MapLibreMap user interface.
MapLibreMethodChannel
MapLibrePlatform
MapLibreStyles
MapLibre styles used mostly for demonstration.
MinMaxZoomPreference
Preferred bounds for map camera zoom level. Used with MapLibreMapOptions to wrap min and max zoom. This allows distinguishing between specifying unbounded zooming (null minZoom and maxZoom) from not specifying anything (null MinMaxZoomPreference).
OfflineRegion
Description of a downloaded region including its identifier.
OfflineRegionDefinition
Description of region to be downloaded. Identifier will be generated when the download is initiated.
OfflineRegionStatus
Status of an offline region's download.
Points
Represents points information for a navigation instruction
RasterDemSourceProperties
RasterLayerProperties
RasterSourceProperties
SourceProperties
Success
Symbol
SymbolLayerProperties
SymbolManager
SymbolOptions
Configuration options for Symbol instances.
UserHeading
Type represents a geomagnetic value, measured in microteslas, relative to a device axis in three dimensional space.
UserLocation
User's observed location
VectorSourceProperties
VideoSourceProperties

Enums

AnnotationType
AttributionButtonPosition
Attribution Button Position
BaatoApiEndpoint
Enum representing the available Baato API endpoints
BaatoDirectionMode
CameraAnimationInterpolation
Easing curve for MapLibreMapController.easeCamera animations.
CompassViewPosition
Compass View Position
DragEventType
HoverEventType
LocationPriority
An enum representing the priority for location accuracy and power usage. (Android only)
LogoViewPosition
Logo View Position
MyLocationRenderMode
Specifies if and how the user's heading/bearing is rendered in the user location indicator.
MyLocationTrackingMode
The camera mode, which determines how the map camera will track the rendered location.
ScaleControlPosition
Scale Control Position
ScaleControlUnit
Scale Control Unit

Functions

buildFeatureCollection(List<Map<String, dynamic>> features) Map<String, dynamic>
clearAmbientCache() Future<void>
Removes all tiles from the shared ambient cache that are not associated with any offline region. Call this after deleteOfflineRegion to fully evict tiles that would otherwise be reused by a future download of the same area.
deleteOfflineRegion(int id) Future
downloadOfflineRegion(OfflineRegionDefinition definition, {Map<String, dynamic> metadata = const {}, dynamic onEvent(DownloadRegionStatus event)?}) Future<OfflineRegion>
getListOfRegions() Future<List<OfflineRegion>>
getOfflineRegionStatus(int id) Future<OfflineRegionStatus>
Gets the current download status of an offline region.
getRandomString([int length = 10]) String
installOfflineMapTiles(String tilesDb) Future<void>
Copy tiles db file passed in to the tiles cache directory (sideloaded) to make tiles available offline.
mergeOfflineRegions(String path) Future<List<OfflineRegion>>
pauseOfflineRegionDownload(int id) Future<void>
Pauses an in-progress offline region download.
resetOfflineDatabase() Future<void>
Resets the entire offline database: deletes every offline region and clears the ambient cache. Use with care — offline regions cannot be recovered afterwards.
resumeOfflineRegionDownload(int id) Future<void>
Resumes a paused offline region download.
setHttpHeaders(Map<String, String> headers) Future<void>
Sets HTTP headers that are injected into every network request MapLibre makes (tile fetches, style JSON, sprites, glyphs).
setOffline(bool offline) Future
setOfflineMaxConcurrentRequests({int? maxRequests, int? maxRequestsPerHost}) Future<void>
Sets the maximum number of concurrent HTTP requests for tile downloads.
setOfflineTileCountLimit(int limit) Future
updateOfflineRegionMetadata(int id, Map<String, dynamic> metadata) Future<OfflineRegion>

Typedefs

MapCreatedCallback = void Function(MapLibreMapController controller)
OnCameraIdleCallback = void Function()
OnCameraMoveCallback = void Function(CameraPosition cameraPosition)
OnCameraTrackingChangedCallback = void Function(MyLocationTrackingMode mode)
OnCameraTrackingDismissedCallback = void Function()
OnFeatureDragCallback = void Function(Point<double> point, LatLng origin, LatLng current, LatLng delta, String id, Annotation? annotation, DragEventType eventType)
OnFeatureHoverCallback = void Function(Point<double> point, LatLng coordinates, String id, Annotation? annotation, HoverEventType eventType)
OnFeatureInteractionCallback = void Function(Point<double> point, LatLng coordinates, String id, String layerId, Annotation? annotation)
OnMapClickCallback = void Function(Point<double> point, LatLng coordinates)
OnMapIdleCallback = void Function()
OnMapLongClickCallback = void Function(Point<double> point, LatLng coordinates)
OnMapMouseMoveCallback = void Function(Point<double> point, LatLng coordinates)
OnPlatformViewCreatedCallback = void Function(int)
The default instance of MapLibrePlatform to use.
OnStyleLoadedCallback = void Function()
OnUserLocationUpdated = void Function(UserLocation location)

Exceptions / Errors

FailedAuthException
Exception thrown when authentication fails
IsEmptyException
Exception thrown when a value is empty
IsNullException
Exception thrown when a value is null
SMSDeliveryException
Exception thrown when SMS delivery fails
SMSDetailsException
Exception thrown when there are issues with SMS details