dart_mapbox_search 1.0.0 copy "dart_mapbox_search: ^1.0.0" to clipboard
dart_mapbox_search: ^1.0.0 copied to clipboard

A Dart package for the Mapbox Search Box and Geocoding APIs.

dart_mapbox_search #

Mapbox Search made easy! 💎

A Dart package for interacting with the Mapbox Search Box and Geocoding APIs. It provides a set of utilities and models to facilitate integration with Mapbox's powerful search capabilities.

pub package License

Developed with 💙 and maintained by scial.app

"Buy Me A Coffee"

Supported features #

Feature API Endpoint Available
Get suggested results Search Box API /suggest
Retrieve a suggested feature Search Box API /retrieve
Get search results Search Box API /forward
Retrieve POIs by category Search Box API /category
Get category list Search Box API /list/category
Do a reverse lookup Search Box API /reverse
Forward geocoding with search text input Geocoding API /forward
Forward geocoding with structured input Geocoding API /forward
Reverse geocoding Geocoding API /reverse
Batch geocoding Geocoding API /batch

Quick Start 🚀 #

Installation 🧑‍💻 #

In the dependencies section of your pubspec.yaml, add the following line:

dependencies:
  dart_mapbox_search: <latest_version>

Usage 👽 #

Import the package:

import 'package:dart_mapbox_search/dart_mapbox_search.dart';

Create an instance:

late final MapboxSearchClient mapboxSearch;

void main() async {
    final MapboxSearch result = MapboxSearch.initialize(accessToken: '...');
    mapboxSearch = result.client;
}

Make use of one of the many methods provided by this package e.g.:

final MapboxSearchResult<MapboxSearchSuggestResponse> response = await mapboxSearch.search.suggest('scial Headquarter');
response.fold(
    onSuccess: (MapboxSearchSuggestResponse data) => print('Data found!'), 
    onFailure: (int statusCode, String? message, String? error) => print('Error occured.')
);

Contribution 💙 #

Always open for contribution! Contributors will be listed here.

0
likes
130
pub points
1%
popularity

Publisher

verified publisherscial.app

A Dart package for the Mapbox Search Box and Geocoding APIs.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

http, uuid

More

Packages that depend on dart_mapbox_search