v1.1.0
mapbox_api
公式の Mapbox ドキュメントに従う非公式の Mapbox Dart SDK。
26いいね 20030日間ダウンロード150Pub ポイント
AndroidiOSWebmacOSWindowsLinux
Mapbox API - Dart SDK
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
This package aim to :
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
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
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
| 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: |
| 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: |
| 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 |
| Service | Implemented |
|---|---|
| Tokens | :heavy_multiplication_x: |
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.
用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗