开发者

How can I get a more accurate location?

开发者 https://www.devze.com 2023-01-09 15:03 出处:网络
I\'m trying to ge开发者_StackOverflowt my current location and show it on a map. Class com.google.android.maps.MyLocationOverlay.MyLocationOverlay does most of the work for you.

I'm trying to ge开发者_StackOverflowt my current location and show it on a map.

Class com.google.android.maps.MyLocationOverlay.MyLocationOverlay does most of the work for you.

But it's coming back with a very coarse result that's off by a couple of clicks.

I'm listening for onAccuracyChanged() but that never gets called.

How can I get a more accurate location when using MyLocationOverlay?

P.S. manifest has:

 <application android:icon="@drawable/icon" android:label="@string/app_name"
    android:debuggable="true">
    <uses-library android:name="com.google.android.maps" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>    


Discovered my own answer.

The Settings App has a "Location" entry.

Under location, you can individually choose to enable or disable GPS or network use for location finding. I had GPS (the more accurate choice) disabled.

Thanks,

Peter
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号