- fixed MapViewPosition scaleMap

- fixed GLRender isVisible() for proxy tiles
- smoother scale animation
This commit is contained in:
Hannes Janetzek
2012-09-22 07:24:35 +02:00
parent 8d57bc7531
commit 7d7cf10d89
13 changed files with 511 additions and 410 deletions

View File

@@ -83,6 +83,8 @@ public class MapView extends FrameLayout {
private String mRenderTheme;
private Map<String, String> mMapOptions;
// private final Handler mHandler;
/**
* @param context
* the enclosing MapActivity instance.
@@ -124,6 +126,8 @@ public class MapView extends FrameLayout {
MapActivity mapActivity = (MapActivity) context;
// mHandler = new DelayedTaskHandler();
debugSettings = new DebugSettings(false, false, false, false);
mMapDatabaseType = mapDatabaseType;
@@ -205,6 +209,29 @@ public class MapView extends FrameLayout {
return mMapViewPosition;
}
public void enableRotation(boolean enable) {
enableRotation = enable;
if (enable) {
enableCompass(false);
}
}
public void enableCompass(boolean enable) {
if (enable == this.enableCompass)
return;
this.enableCompass = enable;
if (enable)
enableRotation(false);
if (enable)
mCompass.enable();
else
mCompass.disable();
}
@Override
public boolean onTouchEvent(MotionEvent motionEvent) {
// mMapZoomControls.onMapViewTouchEvent(motionEvent.getAction()
@@ -601,30 +628,6 @@ public class MapView extends FrameLayout {
mapWorker.proceed();
}
public void enableRotation(boolean enable) {
enableRotation = enable;
if (enable) {
enableCompass(false);
}
}
public void enableCompass(boolean enable) {
if (enable == this.enableCompass)
return;
this.enableCompass = enable;
if (enable)
enableRotation(false);
if (enable)
mCompass.enable();
else
mCompass.disable();
}
// /**
// * Sets the visibility of the zoom controls.
// *
@@ -647,18 +650,4 @@ public class MapView extends FrameLayout {
// mJobParameters = new JobParameters(mJobParameters.theme, textScale);
// clearAndRedrawMapView();
// }
// public final int
// public Handler messageHandler = new Handler() {
//
// @Override
// public void handleMessage(Message msg) {
// switch (msg.what) {
// // handle update
// // .....
// }
// }
//
// };
}