skip to Main Content

I have Location but in terms of Google map URL and want to convert it into address. Can anyone tell me How to Do it ? I am using Flutter and MongoDB as a DB . I am storing merchants Live Location in terms of Google Map Location (https…) and want it its address.

2

Answers


  1. You can call a http request to google API

    https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&key=YOUR_API_KEY
    

    https://developers.google.com/maps/documentation/geocoding/start#reverse

    If you don’t have YOUR_API_KEY (google API key for maps) you can create it

    Login or Signup to reply.
  2. import 'package:geocoding/geocoding.dart';
    
    
     List<Placemark> placemarks = await placemarkFromCoordinates(
                currentLocation.latitude, currentLocation.longitude);
            Placemark placeMark = placemarks[0];
    

    You can convert lat lan into address by this way

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search