问题标签 [location-based-service]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
925 浏览

java - 如何在 Android Studio 中以字符串形式获取地图标记的位置?

我正在尝试从基于位置的服务应用程序中获取标记的当前位置,然后将该位置显示为字符串。我需要调用哪些课程?我知道我可以将地图变量作为 GoogleMap 获取,但我不确定要调用哪些函数来获取纬度和经度,然后将其转换为字符串。

提前致谢!

到目前为止,这是我的代码。我试图将它放在 displayCurrentLocation 中以将当前位置显示为吐司: