ola_maps_api library

Classes

Address
Geocoded place returned by Places / Geocode APIs.
AddressComponent
One structured part of an Address (city, postal code, …).
AddressValidationComponent
One component from address validation.
AddressValidationResult
Result of an address-validation call.
AutoCompleteResults
One Places Autocomplete suggestion.
ElevationResult
Elevation at a coordinate.
Geofence
Stored geofence from the Places Geofence API.
GeofenceListResult
Paged list of Geofence records.
GeofenceRequest
Payload for create/update geofence calls.
GeofenceStatus
Point-in-fence check result.
Geometry
Coordinate plus optional viewport for a place.
Location
Latitude / longitude used by Places and Routing HTTP APIs.
MapStyleInfo
Published vector style from the Tiles API.
MatchedSubstring
Character range that matched an autocomplete query.
NearByPlaceDetails
Nearby Search row from Places.
NearestRoadResult
Nearest road for a single query point.
Olamaps
HTTP helpers for Ola Maps REST APIs (Places, Geocode, Roads, Geofencing, Elevation, Tiles, Street View, Routing).
OlaMapsAutocomplete
Search-as-you-type Places Autocomplete dropdown.
OlaMapsElevation
Point elevation lookups.
OlaMapsGeofence
Geofence CRUD and point-in-fence checks.
OlaMapsLanguage
ISO 639-1 language codes supported by Ola Maps Places, Routing, Geocoding, and Maps APIs. Defaults to en when omitted.
OlaMapsRoads
Roads APIs: snap-to-road, nearest roads, and speed limits.
OlaMapsStreetView
Street View coverage, image ids, and metadata.
OlaMapsTiles
Static maps, style URLs, and 3D tileset helpers.
OpeningHours
Published hours for a PlaceDetails result.
Period
One open/close window inside OpeningHours.
PlaceDetails
Full place record from Place Details.
PlacePhoto
Photo metadata from Places.
PlusCode
Open Location Code (Plus Code) for a place.
Review
User review attached to PlaceDetails.
SnappedPoint
One GPS sample snapped onto the road network.
SnapToRoadResult
Response from snap-to-road.
SpeedLimitEntry
Posted speed limit for one snapped point.
SpeedLimitsResult
Response from the speed-limits API.
StaticMapMarker
Marker overlay for a static map image.
StreetViewImageId
Nearest Street View panorama id.
StreetViewMetadata
Metadata for a Street View panorama.
StructuredFormatting
Primary and secondary labels for a prediction.
Term
One token in a prediction description.
TextSearchPrediction
One row from Places text search.
Time
Weekday plus HHmm clock time.
Viewport
Southwest / northeast pair describing a map bounds.

Enums

Status
Outcome flag used by Places and Geocode JSON envelopes.

Functions

flattenPredictions(dynamic predictions) → List
Flattens nested autocomplete prediction arrays.
parseStatus(String status) → Status
Maps an Ola Maps status string to Status. Unknown values become Status.ok.
stringList(dynamic value) → List<String>
Coerces a JSON list or comma-separated string into List<String>.

Exceptions / Errors

ApiException
Base error thrown by Ola Maps HTTP helpers.
BadRequestException
HTTP 400 from an Ola Maps endpoint.
NotFoundException
HTTP 404 from an Ola Maps endpoint.
ServerException
HTTP 500 from an Ola Maps endpoint.
UnauthorizedException
HTTP 401 from an Ola Maps endpoint.
UnprocessableException
HTTP 422 from an Ola Maps endpoint.