| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.
Important:
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.
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.
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.
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.
This geocoding plugin for Flutter is developed by Baseflow.
| Back | FazBrowse Home | New Git URL |