繁体   English   中英

如何显示带标记的map视图并获取经纬度到textview

[英]How to show map view with mark and get the longitude and latitude to textview

在我的 android 应用程序中,我必须通过用户在 mapview 中定位标记来获取用户位置,然后 textview 下面到 map 视图将显示经度和纬度,如何做

在我的代码中,我使用此代码取值经度和纬度

 LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());

在此之后,您可以在 map 上创建标记

place_on_map = new MarkerOptions().position(latLng);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM