カテゴリー・パッケージ・リポジトリを検索

パッケージ詳細v1.0.3

here_maps_webservice

検索からジオコーディングまで、さまざまな目的に使用できる Here Maps Web Services API のラッパーを提供する Flutter パッケージ。

30日間ダウンロード
25
いいね数
18
Pub ポイント
35

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

flutter pub add here_maps_webservice

パッケージ概要

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

Here Maps Web Services API をラップする Flutter パッケージで、検索、ジオコーディング、リバースジオコーディングなどの位置ベースの機能をアプリに統合できるようにします。クリーンな Dart インターフェースを通じて、Here Maps の強力なマッピングおよび位置データサービスへのアクセスを簡素化します。正確な住所解決、場所の発見、またはマップ関連のクエリが必要なアプリケーションに最適です。pub.dev を通じて Flutter プロジェクトにスムーズに統合できます。

用途

  • 住所を座標に変換する
  • 座標を逆ジオコーディングして住所に変換する
  • 場所や観光スポットを検索
  • マップでの位置データの統合
  • オートコンプリートを使用した住所ピッカーの構築

主な機能

  • Here Maps 用のシンプルな API ラッパー
  • ジオコーディングおよびリバースジオコーディングをサポート
  • 検索機能を配置する
  • Flutter との簡単な統合
  • 軽量でコアサービスに集中

適している対象

  • 正確な位置情報が必要なアプリ
  • Here Maps API を使用する開発者
  • 場所に応じたアプリケーション
  • 候補付きの住所入力
  • 場所データを必要とする地図ベースのサービス

注意事項

  • Here Maps API の資格情報が必要です
  • Webサービスに限定(オフライン対応なし)
  • ネットワーク接続に依存しています
  • 組み込みのマップUIレンダリングなし
  • プラットフォーム固有の動作は異なる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Here

here_maps_webservice

pub package

About

here_maps_webservice provides Here Maps Web Services API wrapper that serve different purposes from search, to geocoding.

Usage

Add here_maps_webserviceas a dependency in your pubspec.yaml

 dependencies:
  flutter:
    sdk: flutter
  here_maps_webservice: 1.0.2

Run flutter pub get in the terminal and import import 'package:here_maps_webservice/here_maps.dart'

Availabel APIs

Generate API KEY

Go to https://developer.here.com/ and create a new account if you don't have one. Create a new project and select Freemium Plan. Under the REST section of your project, click on Create API key.

Example

Nearby Places
    import 'package:here_maps_webservice/here_maps.dart';
    import 'package:location/location.dart' as l; 
    import 'package:flutter/services.dart';
    
    var currentLocation;
    var location = new l.Location();
    List<dynamic> _nearbyPlaces=[]; 

    try {
      currentLocation = await location.getLocation();
      }on PlatformException catch (error) {
      if (error.code == 'PERMISSION_DENIED') {
        print("Permission Dennied");
      }
    }
    
    HereMaps(apiKey: "your apiKey")
          .exploreNearbyPlaces( lat: currentLocation.latitude, lon: currentLocation.longitude,offset: 10)
          .then((response) {
              setState(() {
                  _nearbyPlaces.addAll(response['results']['items']);
              });
          });

Popular Places
    import 'package:here_maps_webservice/here_maps.dart';
    import 'package:location/location.dart' as l; 
    import 'package:flutter/services.dart';
    
    var currentLocation;
    var location = new l.Location();
    List<dynamic> _explorePopularPlace = []; 

    try {
      currentLocation = await location.getLocation();
      }on PlatformException catch (error) {
      if (error.code == 'PERMISSION_DENIED') {
        print("Permission Dennied");
      }
    }
    
    HereMaps(apiKey: "your apiKey")
          .explorePopularPlaces(
              lat: currentLocation.latitude,
              lon: currentLocation.longitude,
              offset: 10)
          .then((response) {
        setState(() {
          _explorePopularPlace.addAll(response['results']['items']);
        });
      });

Geocoding Autocomplete
     import 'package:here_maps_webservice/here_maps.dart';
     
     List<dynamic> _suggestion = [];
     
     HereMaps(apiKey: "your apiKey")
           .geoCodingAutoComplete(query: "YourQuery")
           .then((response) {
         setState(() {
           _suggestion.addAll(response['suggestions']);
         });
       });
Geocoding
    import 'package:here_maps_webservice/here_maps.dart';
    
    Map<String, dynamic> latLon = Map();
    
    HereMaps(apiKey: "your apiKey")
        .geoCode(searchText: _searchController.text)
        .then((response) {
      setState(() {
        latLon = response['Response']['View'][0]['Result'][0]['Location']
            ['DisplayPosition'];
      });
    });
Reverse Geocoding
    import 'package:here_maps_webservice/here_maps.dart';
    import 'package:location/location.dart' as l; 
    import 'package:flutter/services.dart';
    
    var currentLocation;
    var location = new l.Location();

    try {
      currentLocation = await location.getLocation();
      }on PlatformException catch (error) {
      if (error.code == 'PERMISSION_DENIED') {
        print("Permission Dennied");
      }
    }
    
    Map<String,dynamic> response = HereMaps(apiKey: "your apiKey")
      .reverseGeoCode(lat: currentLocation.latitude, lon: currentLocation.longitude)

TODO

  • Add all the parameters in the existing APIs
  • Add tests
  • Make Model class for exisitng APIs
  • Add routing APIs

Feature Requests and Issues

Please file feature requests and bugs at the issue tracker

Contributing

We would love to see you contribute to here_maps_webservice. Do check out our Contributing Guidelines.

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

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

データはまだありません。