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

패키지 상세v1.1.1

flutter_google_maps_webservices

Flutter용 Google 맵 웹 서비스 (지오코딩, 장소, 경로, 거리 행렬, 사진, 시간대, 정적 지도)

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.7만
좋아요
27
Pub 점수
150

패키지 설치

flutter pub add flutter_google_maps_webservices

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Google Maps 웹 서비스에 대한 액세스를 제공하는 플러터 패키지로, 개발자가 지오코딩, 장소 검색, 경로 안내, 거리 행렬, 사진 조회, 시간대 정보 및 정적 지도를 애플리케이션에 통합할 수 있도록 합니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원합니다. 깔끔한 Dart 인터페이스를 통해 API 상호작용을 단순화하여 HTTP 요청을 수동으로 관리하지 않고도 지도 관련 데이터를 쉽게 가져올 수 있게 해줍니다. 위치 지능과 지도 기반 기능이 필요한 앱에 이상적입니다.

사용 사례

  • 주소를 좌표로 변환하기
  • 근처 장소 검색
  • 경로 및 여행 방향 계산 중
  • 위치 간 거리 및 소요 시간 가져오기
  • 정적 지도 이미지 표시
  • 위치 기반으로 시간대 정보 검색

주요 기능

  • 모든 주요 구글 맵 웹 서비스를 지원합니다
  • 크로스 플랫폼 호환성
  • 간단하고 직관적인 Dart API
  • 내장 오류 처리
  • 비동기 요청 관리
  • 경량이고 통합하기 쉬움

적합한 대상

  • 위치 인식 애플리케이션
  • 여행 및 내비게이션 앱
  • 부동산 및 부동산 찾기
  • 배송 및 물류 서비스
  • 관광 및 탐색 플랫폼
  • 지도 데이터 통합이 필요한 앱

고려 사항

  • Google Cloud Platform API 키가 필요합니다
  • 사용 레벨에 따라 레이트 제한이 적용됩니다
  • 높은 사용량 시 추가 비용이 발생할 수 있습니다
  • 모든 작업에는 인터넷 연결이 필요합니다
  • 생산 환경에서는 API 키를 보호해야 합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_google_maps_webservices

Build Status codecov Star on Github Buy Me A Coffee

General Information

This is the Dart Library for Google Maps Webservices. You can find the Google Maps Platform Documentation here, but if you're new to this, you may want to start here.

API Key

To use this library you need a Web API key. Follow these steps to acquire the key relevant to your particular Dart application.

These keys are not to be used individually as Android or iOS API keys, but they are instead meant to be used in your Dart application.

Availables API

Usage

Geocoding
import "package:flutter_google_maps_webservices/geocoding.dart";

final geocoding = GoogleMapsGeocoding(apiKey: "<API_KEY>");
final geocoding = GoogleMapsGeocoding(apiKey: "<API_KEY>", httpClient: BrowserClient());
final geocoding = GoogleMapsGeocoding(baseUrl: "http://myProxy.com");

GeocodingResponse response = await geocoding.searchByAddress("1600 Amphitheatre Parkway, Mountain View, CA");
Places
import "package:flutter_google_maps_webservices/places.dart";

final places = GoogleMapsPlaces(apiKey: "<API_KEY>");
final places = GoogleMapsPlaces(apiKey: "<API_KEY>", httpClient: BrowserClient());
final places = GoogleMapsPlaces(baseUrl: "http://myProxy.com");

PlacesSearchResponse response = await places.searchNearbyWithRadius(Location(lat: 31.0424, lng: 42.421), 500);
PlacesSearchResponse response = await places.searchNearbyWithRankby(Location(lat: 31.0424, lng: 42.421), "distance");
PlacesSearchResponse response = await places.searchByText("123 Main Street");

PlacesDetailsResponse response = await places.getDetailsByPlaceId("PLACE_ID");
PlacesDetailsResponse response = await places.getDetailsByReference("REF");
Timezone
import "package:flutter_google_maps_webservices/timezone.dart";

final timezone = GoogleMapsTimezone(apiKey: "<API_KEY>");
final timezone = GoogleMapsTimezone(apiKey: "<API_KEY>", httpClient: BrowserClient());
final timezone = GoogleMapsTimezone(baseUrl: "http://myProxy.com");

TimezoneResponse response = await timezone.getByLocation(Location(lat: 31.0424, lng: 42.421));
TimezoneResponse response = await timezone.getByLocation(Location(lat: 31.0424, lng: 42.421), timestamp: DateTime.utc(2019, 4, 24));
TimezoneResponse response = await timezone.getByLocation(Location(lat: 31.0424, lng: 42.421), timestamp: DateTime.utc(2019, 4, 24), language: 'es');
Static Map

  StaticMap mapStatic = StaticMap(
    apiKey,
    markers: List.from([
      Location(lat: 23.721160, lng: 90.394435),
      Location(lat: 23.732322, lng: 90.385142),]
    ),
    path: Path(
      enc: 'svh~F`j}uOusC`bD',
      color: 'black',
    ),
    scale: 'false'
  )

  String url = mapStatic.getUrl();

  Image.network(url)


Proxy

In case of using a proxy the baseUrl can be set. The apiKey is not required in case the proxy sets it. (Not storing the apiKey in the app is good practice)

Feature Requests and Issues

Please file feature requests and bugs at the issue tracker.

카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트