패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소stafyniaksacha/mapbox-api

mapbox-api

Mapbox API - Dart SDK

mapbox-api 프로젝트 이미지
스타
5
포크
11
최근 푸시(UTC)
2024. 12. 27.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

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.

Sacha Stafyniak GitHub avatar
GitHub 작성자

Sacha Stafyniak ↗

hello wolrd

@nexteneoFrance
언어Dart

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗