Search packages, repositories and app categories

Package detailsv1.1.0

mapbox_api

Unofficial Mapbox Dart SDK that follow official Mapbox documentation.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
200
Likes
26
Pub points
150

Install package

flutter pub add mapbox_api

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The mapbox_api package is an unofficial Dart SDK for Mapbox that aligns with official Mapbox documentation. It enables developers to integrate Mapbox's geolocation and mapping features into Flutter applications across multiple platforms, including Android, iOS, Web, macOS, Windows, and Linux. The package provides a straightforward interface for accessing Mapbox services such as maps rendering, geocoding, and routing, making it easier to build location-aware apps without relying on native platform code. It is maintained by the community and hosted on GitHub.

Use cases

  • Integrating interactive maps in Flutter apps
  • Performing geocoding and reverse geocoding
  • Implementing route planning and navigation
  • Displaying custom map styles
  • Building location-based analytics dashboards

Key features

  • Follows official Mapbox API documentation
  • Cross-platform support (Android, iOS, Web, macOS, Windows, Linux)
  • Simple Dart interface for Mapbox services
  • Real-time map rendering
  • Support for custom map tiles and styles

Suitable for

  • Flutter developers building location-aware apps
  • Teams needing cross-platform map integration
  • Projects requiring Mapbox-specific features like vector tiles
  • Developers familiar with Mapbox APIs
  • Apps targeting mobile and web simultaneously

Considerations

  • Unofficial SDK – may lag behind official updates
  • Requires Mapbox API keys
  • Limited error handling compared to official SDKs
  • Depends on third-party maintenance
  • No built-in map UI components beyond basic rendering

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

mapbox_api

This package aim to :

Examples

See examples/ for all available examples

import 'package:mapbox_api/mapbox_api.dart';

MapboxApi mapbox = MapboxApi(
  accessToken: '<Mapbox API token>',
);

Get your API token on mapbox.com

Request directions services
final response = await mapbox.directions.request(
  profile: NavigationProfile.DRIVING_TRAFFIC,
  overview: NavigationOverview.FULL,
  geometries: NavigationGeometries.GEOJSON,
  steps: true,
  coordinates: <List<double>>[
    <double>[
      37.786060, // latitude
      -122.246225, // longitude
    ],
    <double>[
      37.785939, // latitude
      -122.194292, // longitude
    ],
  ],
);

if (response.error == null) {
  // response.routes ...
  // response.waypoints ...
}

see basic example: example/example.dart
see full example with flutter_gl: example/example_directions_flutter.dart

Request forward geocoding services
final response = await mapbox.forwardGeocoding.request(
  searchText: 'tour eiffel',
  fuzzyMatch: true,
  language: 'fr',
  proximity: <double>[
    48.858638, // latitude
    2.286020, // longitude
  ],
);

if (response.error == null) {
  // response.features ...
}

see full example : example/example_forward_search.dart

Supported API

Maps
Service Implemented
Vector Tiles :heavy_multiplication_x:
Taster Tiles :heavy_multiplication_x:
Static Images :heavy_multiplication_x:
Static Tiles :heavy_multiplication_x:
Styles :heavy_multiplication_x:
Tilequery :heavy_multiplication_x:
Uploads :heavy_multiplication_x:
Mapbox Tiling Service :heavy_multiplication_x:
Datasets :heavy_multiplication_x:
Fonts :heavy_multiplication_x:
Navigation
Service Implemented Example
Directions :white_check_mark: example/example.dart
example/example_directions_flutter.dart
Isochrone :white_check_mark:
Map Matching :white_check_mark:
Matrix :white_check_mark:
Optimization :white_check_mark:
Search
Service Implemented Batch Example
Forward Geocoding :white_check_mark: :white_check_mark: example/example_forward_search.dart
Reverse Geocoding :white_check_mark: :white_check_mark: example/example_reverse_search.dart
Intersection :white_check_mark: :heavy_multiplication_x: example/example_intersection_search.dart
Accounts
Service Implemented
Tokens :heavy_multiplication_x:

Related Packages

This SDK will work perfectly with flutter-mapbox-gl to display retrieved data (will work with any other package too). You may also need polyline package to convert polylines strings to coordinates.

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.