Mylocation在Galaxy选项卡p1300中不起作用

时间:2012-12-05 12:38:47

标签: android mapactivity galaxy-tab mylocationoverlay

这是我的地图活动类。在这个应用程序中,mylocation可以在Google nexus手机上完美运行,但在Galaxy选项卡P3100中无效。我在运行应用程序之前检查了 wifi连接。我启用了1。 使用gps卫星,2。位置和Google 3. 使用无线网络

公共类MyMap扩展了MapActivity {

private MapController mapController;
private MyLocationOverlay myLocation;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    MapView mapView = (MapView) findViewById(R.id.map_view);
    mapController = mapView.getController();



    mapController.setZoom(6);
    mapView.setBuiltInZoomControls(true);

    myLocation = new MyLocationOverlay(this, mapView);
    mapView.getOverlays().add(myLocation);

    myLocation.enableMyLocation();

    myLocation.runOnFirstFix(new Runnable() {
        public void run() {
            mapController.animateTo(myLocation.getMyLocation());
        }
    });
}

@Override
protected void onResume() {
    super.onResume();
    myLocation.enableMyLocation();
}

@Override
protected void onPause() {
    super.onPause();
    myLocation.disableMyLocation();
}

@Override
protected boolean isRouteDisplayed() {
    // TODO Auto-generated method stub
    return false;
}
 }

返回

 Uncaught exception thrown by finalizer
 java.lang.IllegalStateException: Binder has been finalized!
 at android.os.BinderProxy.transact(Native Method)
 at android.database.BulkCursorProxy.close(BulkCursorNative.java:288)
 at android.database.BulkCursorToCursorAdaptor.close(BulkCursorToCursorAdaptor.java:133)
at android.database.CursorWrapper.close(CursorWrapper.java:49)
at android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:1591)
    at android.content.ContentResolver$CursorWrapperInner.finalize(ContentResolver.java:1604)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
at java.lang.Thread.run(Thread.java:856)

请给我一个解决方案..

感谢。

0 个答案:

没有答案