geocoding 5.0.0 copy "geocoding: ^5.0.0" to clipboard
geocoding: ^5.0.0 copied to clipboard

A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.

Flutter Geocoding Plugin #

pub package License: MIT style: effective dart Buid status codecov

A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.

Important:

  1. This plugin uses the free Geocoding services provided by the iOS, macOS and Android platforms. This means that there are restrictions to their use. More information can be found in the Apple documentation for iOS and macOS and the Google documentation for Android. When a PlatformException(IO_ERROR, ...) gets thrown, most of the times it means that the rate limit has been reached.
  2. The availability of the Google Play Services depends on your country. If your country doesn't support a connection with the Google Play Services, you'll need to try a VPN to establish a connection. For more information about how to work with Google Play Services visit the following link: https://developers.google.com/android/guides/overview

Installing #

To use this plugin, please follow the installation guide on the official geocoding plugin page.

Migrating to version 5.0.0

Check out our migration guide when upgrading to version 5.0.0.

Usage #

To start using the Geocoding plugin import the geocoding/geocoding.dart package and create an instance of the Geocoding class:

import 'package:geocoding/geocoding.dart';

final Geocoding geocoding = Geocoding();

Use the newly created instance to perform geocoding translations. For example use the Geocoding.placemarkFromCoordinates method to convert latitude and longitude coordinates into a list of addresses (the addressed are sorted on relevance, the first entry in the list is nearest to the coordinates):

// Returns a list of addresses matching the supplied coordinates. The first 
// entry in the list is generally the address closest to the supplied 
// coordinates.
List<Placemark> placemarks = await geocoding.placemarkFromCoordinates(52.2165157, 6.9437819);

To convert an address into coordinates use the Geocoding.locationFromAddress method:

// Returns a list of latitude / longitude coordinates matching the supplied
// address. The first entry in the list is the coordinate nearest to the
// address.
List<Location> locations = await geocoding.locationFromAddress('Gronausestraat 710, Enschede');

It is also possible to try convert a partial address into a more detailed address using the Geocoding.placemarkFromAddress method:

// Returns a list of placemarks containing addresses matching the 
// string "Gronausestraat 710".
List<Placemark> placemarks = await placemarkFromAddress('Gronausestraat 710');

All these methods take an instance of the Locale class, which is used to return the address in the desired locale / language.

Issues #

Please file any issues, bugs or feature requests as an issue on our GitHub page. Commercial support is available, you can contact us at hello@baseflow.com.

Want to contribute #

If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.

Author #

This geocoding plugin for Flutter is developed by Baseflow.

1.38k
likes
160
points
606k
downloads

Documentation

API reference

Publisher

verified publisherbaseflow.com

Weekly Downloads

A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

flutter, geocoding_android, geocoding_darwin, geocoding_platform_interface

More

Packages that depend on geocoding

Packages that implement geocoding