【问题标题】:How to show current location of user while open my app打开我的应用程序时如何显示用户的当前位置
【发布时间】:2017-07-01 02:00:17
【问题描述】:

我想制作一个应用程序,当用户打开我的应用程序时,用户将在我的应用程序中获取他们当前的位置,而当用户更改他们的位置时,它也会在特定时间后更新。 我在用户更改位置时得到了更改位置的解决方案,但我需要在用户打开我的应用时显示用户的当前位置

【问题讨论】:

标签: android geolocation latitude-longitude currentlocation


【解决方案1】:
googleMap.setMyLocationEnabled(true);
Location myLocation = googleMap.getMyLocation();

这些是获取当前位置的关键行。

有关更多信息,请参阅以下教程: android show current location on map using google maps api

how to get current location in google map android

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-08-07
  • 1970-01-01
  • 2015-11-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多