Dhaval Chaudhari
Dhaval Chaudhari

Reputation: 595

How to Integrate Map in flutter Application and get marker latitude and longitude which user set on map?

In my application i have to integrate map to get marker latitude and longitude.

after map integration user can set the one marker on the map then get the marker latitude and longitude.

so how i can do this, please help me.

thank you.

Upvotes: 0

Views: 579

Answers (2)

Shanmukha
Shanmukha

Reputation: 2584

you can go through this website This article will solve your all problem Integrating a map in a flutter, getting lat and lng of the current location, and placing a marker on the map as well as marker location too. and many more. Hope it will helpful for you.

Upvotes: 0

Samia Ashraf
Samia Ashraf

Reputation: 303

You have to use the google_maps_flutter plugin and purchase the google maps key. Once that is done, add the GoogleMap widget like,

GoogleMap(
   onCameraMove: (CameraPosition position) {
      lat = position.target.latitude.toString();
      lon = position.target.longitude.toString();
         setState(() {});
   }
);

Upvotes: 0

Related Questions