Skip to content
pubscout

mapbox_search

4.4.0, released 11 months ago by ketanchoyal.dev

Flutter package for place search using MapBox API and static map image generation.

WASM-ready
$ flutter pub add mapbox_search
Source repository

What it does

Provides easy API calls to MapBox Search API for forward geocoding, reverse geocoding, search box suggestions, batch geocoding, and static map image generation with markers and polylines.

AI-written summary of version 4.4.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need Mapbox geocoding or search functionality in your app
  • You want to generate static map images with polylines and markers

Skip it when

  • You require a fully interactive embedded map widget (use a map rendering package instead)
  • You are using Google Maps services instead of Mapbox

Strengths

  • Supports modern Mapbox APIs including SearchBox and Batch Geocoding
  • Includes static map image generation with custom markers and paths
  • Uses safe ApiResponse records to handle success and failure flows

Weaknesses

  • Does not render interactive map views, only handles API calls and static images
  • Requires Dart 3.0 or higher

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
5

Acquire an API key on the Mapbox website and initialize it globally by calling MapBoxSearch.init('API KEY') in your main function.

var geocoding = GeoCoding(apiKey: 'API Key', limit: 5);
Future<ApiResponse<List<MapBoxPlace>>> getPlaces() => geocoding.getPlaces('central park');

Alternatives

Packages that do the same job and could replace mapbox_search.

  • geocoding

    If you prefer using platform-native geocoding services rather than Mapbox specifically.

Works with

Packages commonly used together with mapbox_search: ones it builds on, ones built on it, and its own family.