パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.1.1

flutter_google_maps_webservices

Flutter用のGoogleマップWebサービス(ジオコーディング、場所、経路、距離行列、写真、タイムゾーン、静的マップ)

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1.7万
いいね数
27
Pub ポイント
150

パッケージをインストール

flutter pub add flutter_google_maps_webservices

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Google Maps Web サービスへのアクセスを提供する Flutter パッケージで、開発者がジオコーディング、場所検索、ルート案内、距離行列、写真の取得、タイムゾーン情報、静的マップをアプリに統合できるようにします。このパッケージは、Android、iOS、Web、macOS、Windows、Linux を含む複数のプラットフォームをサポートしています。クリーンな Dart インターフェースにより API 操作を簡素化し、HTTP リクエストを手動で管理しなくても、マップ関連データを簡単に取得できます。場所のインテリジェンスやマップベースの機能が必要なアプリに最適です。

用途

  • 住所を座標に変換する
  • 近くの場所を検索する
  • ルートと旅行の方向を計算しています
  • 場所間の距離と所要時間を取得する
  • 静的マップ画像の表示
  • 場所に基づいてタイムゾーンの詳細を取得する

主な機能

  • すべての主要な Google マップ Web サービスをサポートしています
  • クロスプラットフォーム互換性
  • シンプルで直感的な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 件

ソースリポジトリ

このパッケージを使用しているプロジェクト