google_directions_api
경로 API는 위치 간 경로를 계산하는 서비스입니다. 여러 가지 교통 수단에 대한 경로를 검색할 수 있습니다.
경로 API는 위치 간 경로를 계산하는 서비스입니다. 대중교통, 운전, 보행 또는 자전거 타기와 같은 여러 교통 수단에 대한 경로 검색이 가능합니다.
^3.1.0^1.1.0^2.0.2^2.0.3^1.24.6아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Build Pub GitHub GitHub stars
The Directions API is a service that calculates directions between locations. You can search for directions for several modes of transportation, including transit, driving, walking, or cycling.
The Directions API is a service that calculates directions between locations using an HTTP request.
With the Directions API, you can:
The API returns the most efficient routes when calculating directions. Travel time is the primary factor optimized, but the API may also take into account other factors such as distance, number of turns and many more when deciding which route is the most efficient.
Note: This service is not designed to respond in real time to user input.
For full info about Directions API visit official documentation
import 'package:google_directions_api/google_directions_api.dart';
void main() {
DirectionsService.init('API_KEY');
final directionsService = DirectionsService();
final request = DirectionsRequest(
origin: 'New York',
destination: 'San Francisco',
travelMode: TravelMode.driving,
);
directionsService.route(request,
(DirectionsResult response, DirectionsStatus status) {
if (status == DirectionsStatus.ok) {
// do something with successful response
} else {
// do something with error response
}
});
}
Feel free to post a feature requests or report a bug here.