here_maps_webservice
Flutter Package to provide Here Maps Web Services API wrapper that serve different purposes from search, to geocoding.
Here Maps Package for Flutter
English project snapshot. Visit GitHub for the latest content.
here_maps_webservice
here_maps_webservice provides Here Maps Web Services API wrapper that serve different purposes from search, to geocoding.
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'
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.
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']);
});
});
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']);
});
});
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']);
});
});
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'];
});
});
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)
Please file feature requests and bugs at the issue tracker
We would love to see you contribute to here_maps_webservice. Do check out our Contributing Guidelines.
Dependency list 3 items
{"sdk":"flutter"}^0.12.0+4{"sdk":"flutter"}Start with your use case, compare repository activity, and check the original project before adopting it.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗