Here Maps Package for Flutter

Related tags

Map hacktoberfest
Overview

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.

You might also like...

A Flutter app using Google Maps SDK & Directions API

A Flutter app using Google Maps SDK & Directions API

Flutter Maps A Flutter app using Google Maps SDK & Directions API Plugins The plugins used in this project are: google_maps_flutter geolocator flutter

Apr 19, 2022

Easy Google Maps for Flutter

Easy Google Maps for Flutter

easy_google_maps Easy Google Maps for Flutter on Web and Mobile Getting Started Mobile Follow setup for Mobile Here Web Good to go! EasyGoogleMaps(

Jul 19, 2022

Apple Maps Plugin for Flutter

apple_maps_flutter A Flutter plugin that provides an Apple Maps widget. The plugin relies on Flutter's mechanism for embedding Android and iOS views.

Dec 31, 2022

Flutter plugin for launching maps

Map Launcher Map Launcher is a flutter plugin to find available maps installed on a device and launch them with a marker or show directions. Marker Na

Dec 20, 2022

Place picker on Google Maps for Flutter

Place picker on Google Maps for Flutter

Google Maps Place Picker A Flutter plugin which provides 'Picking Place' using Google Maps widget. The project relies on below packages. Map using Flu

Dec 16, 2022

A car rental flutter application using firebase and google maps API

A car rental flutter application using firebase and google maps API

A car sharing & rental app using Flutter, Firebase & Google Maps APIs 🔥 About the App 🚘 hopOn is flutter based application for car sharing and renta

Dec 30, 2022

Simple flutter app demonstrating usage of Google Maps

flutter_maps_example Get an API key at GoogleCloud. Enable Google Map SDK for ea

Nov 23, 2022

A Flutter plugin for integrating Google Maps in iOS, Android and Web applications

flutter_google_maps A Flutter plugin for integrating Google Maps in iOS, Android and Web applications. It is a wrapper of google_maps_flutter for Mobi

Sep 26, 2022

A flutter plugin that's decodes encoded google poly line string into list of geo-coordinates suitable for showing route/polyline on maps

A flutter plugin that's decodes encoded google poly line string into list of geo-coordinates suitable for showing route/polyline on maps

flutter_polyline_points A flutter plugin that decodes encoded google polyline string into list of geo-coordinates suitable for showing route/polyline

Oct 25, 2022
Comments
  • Plugin Update

    Plugin Update

    Hi, I'm running into issues using this plugin as I have to downgrade several other plugins to run without error. Any chance this is getting updated soon. Mainly, I can't use Dio 4.0.0 which I need to solve an issue I'm having on the web. Using Dio 4 requires an additional 2 plugin updates and then it stops with Here_maps_webservice eventually being the failed plugin.

    opened by jodymac 1
  • Conflict library

    Conflict library

    Hello,

    Would like to use your library, but since you are using location library for your examples and I need this version : location: 3.2.4 I got the following error:

    Because here_maps_webservice >=1.0.3 depends on location ^2.3.5 and v_tracking depends on location 3.2.4, here_maps_webservice >=1.0.3 is forbidden. So, because v_tracking depends on here_maps_webservice 1.0.3, version solving failed.

    Here are used version: location: 3.2.4 here_maps_webservice: 1.0.3

    Could you do anything please? Thank you!

    opened by Miloune 1
  • Implicit Location Context

    Implicit Location Context

    As stated in the Here documentation it is considered best practice to always send implicit location context to the REST Api.

    Are you planning to add this to this library or is this already possible?

    Source: https://developer.here.com/documentation/places/dev_guide/topics/location-contexts.html

    enhancement 
    opened by Avejack 1
  • New feature request

    New feature request

    Can you please try to add the map view/load a map scene to this package or release a new package alone for that. It would be very beneficial for newbies like me. Thank you.

    duplicate enhancement 
    opened by gouthamravella 2
Owner
Ayush Bherwani
Ayush Bherwani
Here Maps Package for Flutter

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

Ayush Bherwani 11 Dec 15, 2022
Flutter Maps A Flutter app using Google Maps SDK & Directions API

Flutter Maps A Flutter app using Google Maps SDK & Directions API Plugins The plugins used in this project are: google_maps_flutter geolocator flutter

Salsabil Mohamed Hemada 1 Jul 15, 2022
This is a Flutter package that uses the Google Maps API to make a TextField that tries to autocomplete places as the user types, with simple smooth animations, making a nice UI and UX.

search_map_place This is a Flutter package that uses the Google Maps API to make a TextField that tries to autocomplete places as the user types, with

Lucas Bernardi 127 Oct 22, 2022
A Flutter package to provide the native maps to Android/iOS

platform_maps_flutter A Flutter package that provides a native map to both Android and iOS devices. The plugin relies on Flutter's mechanism for embed

Luis Thein 70 Aug 13, 2022
A Mapbox GL flutter package for creating custom maps

Flutter Mapbox GL Please note that this project is community driven and is not an official Mapbox product. We welcome feedback and contributions. This

flutter-mapbox-gl 917 Dec 31, 2022
Flutter package to enable clustering of location markers on Google Maps using widgets specific to each location.

flutter_google_maps_widget_cluster_markers This widget implements a very specific adaptation of google_maps_cluster_manager, allowing different ,marke

Kek Tech 2 Jan 6, 2023
Mapbox-flutter - A repository to demonstrate the use of Mapbox - it's Maps and Navigation SDKs in a Flutter application

MapBox Flutter This repository contains code corresponding to the Youtube video

AB Satyaprakash 39 Dec 30, 2022
A flutter plugin for Google Maps

IMPORTANT: This plugin is no longer under development Why? We initially built this plugin to fill an early gap in flutter. Since then, Google has made

AppTree Software, Inc 415 Dec 29, 2022
Flutter Google Maps Tutorial

Flutter Google Maps Tutorial YouTube Video Setup Get an API Key at https://cloud.google.com/maps-platform/ Enable Maps SDK for Android, Maps SDK for i

Marcus Ng 85 Nov 30, 2022
A Flutter app using Google Maps SDK & Directions API

Flutter Maps A Flutter app using Google Maps SDK & Directions API Plugins The plugins used in this project are: google_maps_flutter geolocator flutter

Youhaan bootwala 1 Mar 18, 2022