Merge branch 'dev_custom_map' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into dev_custom_map
This commit is contained in:
@@ -248,27 +248,27 @@ public class AMapViewWrapper implements IMogoMapView, IMogoMapUIController, Loca
|
||||
@Override
|
||||
public MapControlResult changeZoom(boolean zoom) {
|
||||
if (checkAMapView()) {
|
||||
mDefaultZoomLevel = (int) (getMap().getZoomLevel() + 0.5f);
|
||||
mDefaultZoomLevel = (getMap().getZoomLevel() + 0.5f);
|
||||
|
||||
if (zoom) {
|
||||
if (mDefaultZoomLevel >= 20) {
|
||||
if (mDefaultZoomLevel >= 20f) {
|
||||
return MapControlResult.TARGET;
|
||||
}
|
||||
} else {
|
||||
if (mDefaultZoomLevel <= 7) {
|
||||
if (mDefaultZoomLevel <= 7f) {
|
||||
return MapControlResult.TARGET;
|
||||
}
|
||||
}
|
||||
|
||||
if (zoom) {
|
||||
mDefaultZoomLevel += 1f;
|
||||
if (mDefaultZoomLevel > 19) {
|
||||
mDefaultZoomLevel = 19;
|
||||
if (mDefaultZoomLevel > 19f) {
|
||||
mDefaultZoomLevel = 19f;
|
||||
}
|
||||
} else {
|
||||
mDefaultZoomLevel -= 1f;
|
||||
if (mDefaultZoomLevel < 8) {
|
||||
mDefaultZoomLevel = 8;
|
||||
if (mDefaultZoomLevel < 8f) {
|
||||
mDefaultZoomLevel = 8f;
|
||||
}
|
||||
}
|
||||
changeZoom(mDefaultZoomLevel);
|
||||
|
||||
@@ -227,6 +227,7 @@ public class AMapWrapper implements IMogoMap {
|
||||
|
||||
@Override
|
||||
public void changeZoom(float zoom) {
|
||||
Logger.d(TAG, "changeZoom %s", zoom);
|
||||
if (checkAMap()) {
|
||||
mAMap.setZoom((int) zoom);
|
||||
}
|
||||
@@ -236,7 +237,7 @@ public class AMapWrapper implements IMogoMap {
|
||||
public float getZoomLevel() {
|
||||
if (checkAMap()) {
|
||||
try {
|
||||
return mAMap.getZoom()*2;
|
||||
return mAMap.getZoom();
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user