Home > Mobile >  How to Integrate Map in flutter Application and get marker latitude and longitude which user set on
How to Integrate Map in flutter Application and get marker latitude and longitude which user set on

Time:07-01

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.

CodePudding user response:

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(() {});
   }
);

CodePudding user response:

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.

  • Related