분류, 패키지 및 저장소 검색

패키지 상세v1.0.3

here_maps_webservice

검색에서 지오코딩에 이르기까지 다양한 목적을 위한 Here Maps Web Services API 래퍼를 제공하는 플러터 패키지입니다.

30일 다운로드
25
좋아요
18
Pub 점수
35

패키지 설치

flutter pub add here_maps_webservice

패키지 개요

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

Here Maps Web Services API를 래핑하는 플러터 패키지로, 검색, 지오코딩 및 리버스 지오코딩과 같은 위치 기반 기능을 앱에 통합할 수 있도록 해줍니다. 깔끔한 Dart 인터페이스를 통해 Here Maps의 강력한 지도 및 위치 데이터 서비스에 쉽게 접근할 수 있습니다. 정확한 주소 해석, 장소 탐색 또는 지도 관련 쿼리가 필요한 애플리케이션에 적합합니다. pub.dev를 통해 플러터 프로젝트에 원활하게 통합할 수 있습니다.

사용 사례

  • 주소를 좌표로 변환하기
  • 좌표를 주소로 역 지오코딩하기
  • 장소 및 관광지 검색
  • 지도에서 위치 데이터 통합
  • 자동 완성 기능을 사용한 주소 선택기 만들기

주요 기능

  • Here Maps용 간단한 API 래퍼
  • 지오코딩 및 리버스 지오코딩을 지원합니다
  • 검색 기능 배치
  • Flutter와의 간편한 통합
  • 경량이며 핵심 서비스에 집중

적합한 대상

  • 정확한 위치 정보가 필요한 앱
  • Here Maps API를 사용하는 개발자
  • 위치 인식 애플리케이션
  • 제안과 함께 주소 입력
  • 장소 데이터가 필요한 지도 기반 서비스

고려 사항

  • Here Maps API 자격 증명이 필요합니다
  • 웹 서비스에 한정(오프라인 지원 없음)
  • 네트워크 연결에 의존합니다
  • 내장된 지도 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 개

소스 저장소

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

아직 데이터가 없습니다.