Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Geocoding in Flutter is a plugin that basically helps us to retrieve the complete address with the help of Latitude and Longitude and vice-versa.
It helps us to provide better-geocoding results.
Many of our apps retrieve data using this plugin, you may check our Flutter app development services.
This plugin works separately for both Android and iOS platforms i.e., the results of Geocoding for both the platforms will be different as they use their own Platform Geocoding SDKs for address.
For checking more details about Geocoding https://pub.dev/packages/geocoding/install
Step -1 -> Firstly, add the geocoding dependency in the pubspec.yaml file.
Now, run, the ‘pub get’ command to import this package into our project.
Step -2 -> In order to use this plugin we need to make sure that our project is migrated to AndroidX and supports the compileSdkVersion 31.
(For AndroidX migration, check out the official documentation – https://docs.flutter.dev/development/androidx-migration )
Step -3 -> Now, we are ready to code…
In this example, we have converted the Latitude and Longitude into the complete address with the help of placemarkFromCoordinates( _lastMapPosition.latitude, _lastMapPosition.longitude).
Similarly, we can also convert the complete address into latitude and longitude with the help of locationFromAddress(“Tughlak Road Area,NewDelhi,110011”)
Output
In this blog, we have discussed how to use Geocoding plugin to retrieve addresses.
I hope it will help you out in understanding and getting a brief idea about it.
You can also check our blog on MapView in Flutter – https://mobikul.com/mapview-in-flutter/
Thanks for reading!!
https://pub.dev/packages/geocoding
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.