[英]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.谢谢你。
You have to use the google_maps_flutter
plugin and purchase the google maps key.您必须使用
google_maps_flutter
插件并购买 google maps 密钥。 Once that is done, add the GoogleMap widget like,完成后,添加 GoogleMap 小部件,例如,
GoogleMap(
onCameraMove: (CameraPosition position) {
lat = position.target.latitude.toString();
lon = position.target.longitude.toString();
setState(() {});
}
);
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.
希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.