Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnamed place issue #59

Closed
volobot-admin opened this issue Apr 12, 2020 · 1 comment
Closed

Unnamed place issue #59

volobot-admin opened this issue Apr 12, 2020 · 1 comment

Comments

@volobot-admin
Copy link

I had to use this function to solve the issue.
Library always say "unnamed place" even when api keys are enabled.

import 'package:latlong/latlong.dart';
import 'package:geocoder/geocoder.dart';

static Future

getPredictionFromLatLng(LatLng latLng) async {
try {
final coordinates = new Coordinates(latLng.latitude, latLng.longitude);
List addresses =
await Geocoder.local.findAddressesFromCoordinates(coordinates);
Address first = addresses.first;
print("${first.featureName} : ${first.addressLine}");
return first;
} catch (e) {
return null;
}
}

@humazed
Copy link
Owner

humazed commented Apr 12, 2020

duplicate of #16

@humazed humazed closed this as completed Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants