打开我的应用程序时如何显示用户的当前位置
How to show current location of user while open my app
我想制作一个应用程序,当用户打开我的应用程序时,用户将在我的应用程序中获得他们的当前位置,而当用户更改他们的位置时,它也会在特定时间后更新。
当用户更改他们的位置时,我得到了更改位置的解决方案,但是我需要在用户打开我的应用程序时显示用户的当前位置。
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
我想制作一个应用程序,当用户打开我的应用程序时,用户将在我的应用程序中获得他们的当前位置,而当用户更改他们的位置时,它也会在特定时间后更新。 当用户更改他们的位置时,我得到了更改位置的解决方案,但是我需要在用户打开我的应用程序时显示用户的当前位置。
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