0

I am trying to make an app, which will be able to show my current location with a standard blue bubble targeting it. I set my release.keystore, use release.keystore to generate SHA1 fingerprint, and get API key. However, when I start my application, Google Maps is available but not my position, although it appear sometimes. Does anyone have any idea? Thanks a lot.

4

2 回答 2

1

使用以下代码:

    UiSettings uiSettings = googleMap.getUiSettings();
    uiSettings.setMyLocationButtonEnabled(true);

它将在地图上显示一个按钮,当您单击它时,它将显示您当前的位置,并带有蓝点。

于 2013-08-09T12:37:16.323 回答
0

蓝点外观取决于您的设备是否能够自我定位。

确保打开 GPS 并在“设置”应用的“我的位置”部分启用了相关设置:“使用无线网络”和“使用 GPS 卫星”。

于 2013-08-10T07:12:07.303 回答