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

패키지 상세v8.3.0

google_maps

이 패키지를 사용하면 Dart 스크립트에서 Google Maps JavaScript API를 사용할 수 있습니다.

Web
30일 다운로드
118만
좋아요
125
Pub 점수
160

패키지 설치

flutter pub add google_maps

패키지 개요

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

google_maps 패키지는 Dart 애플리케이션이 주로 웹 플랫폼에서 Google Maps JavaScript API와 통합하고 상호작용할 수 있도록 합니다. 이 패키지는 Dart 코드와 Google Maps 기능 사이의 다리를 제공하여 개발자가 Flutter 웹 앱 내에서 인터랙티브한 지도를 삽입하고 마커를 표시하며 사용자 상호작용을 처리하고 지도 뷰를 직접 사용자 정의할 수 있게 해줍니다. 이 패키지는 전체 Google Maps JavaScript API에 접근이 필요한 웹 환경에서 사용하도록 설계되었습니다. Dart 인터페이스를 통해 동적 지도 렌더링과 이벤트 처리를 지원합니다.

사용 사례

  • 웹 앱에 상호작용 지도 삽입하기
  • 위치 마커 및 정보 창 표시
  • 클릭 및 줌과 같은 사용자 지도 상호작용 처리
  • 지도 스타일 및 레이어 맞춤 설정
  • 지도와 지리적 위치 기능 통합

주요 기능

  • 웹 전용 Google Maps 통합
  • Google Maps JavaScript API용 Dart 인터페이스
  • 마커, 다각형 및 오버레이 지원
  • 이벤트 기반 맵 상호작용 모델
  • API 구성을 통한 지도 사용자 정의

적합한 대상

  • 고급 지도 기능을 필요로 하는 플러터 웹 애플리케이션
  • Dart로 Google Maps JavaScript API를 사용하는 개발자
  • 웹에서 상호작용식 지도 시각화가 필요한 프로젝트
  • 지도 동작 및 스타일링에 정밀한 제어가 필요한 앱

고려 사항

  • 웹 플랫폼에만 제한됨
  • 유효한 Google Maps API 키가 필요합니다
  • 외부 자바스크립트 라이브러리 로딩에 의존
  • 생산 배포를 위해 추가 구성이 필요할 수 있습니다
  • 모바일 플랫폼과 호환되지 않습니다

원본 README

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

Dart Google Maps

This project is a library to use Google Maps JavaScript API v3 from dart scripts.

Usage

To use this library in your code:

  • add a dependency in your pubspec.yaml :

    dependencies:
      google_maps:
    
  • add import in your dart code:

    import 'package:google_maps/google_maps.dart';
    
  • Include the Maps API JavaScript using a script tag before your dart script.

    <script src="https://maps.googleapis.com/maps/api/js?key=API_KEY"></script>
    

Please see the Google Maps JavaScript API v3 Getting Started guide for information about obtaining an API Key.

A very simple example :

import 'package:google_maps/google_maps.dart';
import 'package:web/web.dart';

void main() {
  final mapOptions = MapOptions()
    ..zoom = 8
    ..center = LatLng(-34.397, 150.644);
  GMap(document.getElementById('map-canvas') as HTMLElement, mapOptions);
}

Coverage

The library covers all Google Maps JavaScript API v3 and its Libraries.

To use one or more Google Maps Library:

  • add import in your dart code:

    import 'package:google_maps/google_maps_LIBRARY1.dart';
    import 'package:google_maps/google_maps_LIBRARY2.dart';
    
  • Include the Maps API JavaScript using a script tag.

    <script src="http://maps.googleapis.com/maps/api/js?libraries=LIBRARY1,LIBRARY2"></script>
    

NB: This package doesn't support neither alpha or beta elements/libraries.

Examples

Examples found at https://google-developers.appspot.com/maps/documentation/javascript/examples/ are available in a dart version at https://github.com/a14n/dart-google-maps in the example directory.

License

Apache 2.0

카테고리

의존성

의존성 목록 2 개

소스 저장소

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