Viewport: add movement limits public API, closes #11
This commit is contained in:
parent
c8f74e649e
commit
7a952cdaf9
@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012 Hannes Janetzek
|
* Copyright 2012 Hannes Janetzek
|
||||||
|
* Copyright 2016 devemux86
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@ -375,4 +376,100 @@ public class Viewport {
|
|||||||
mViewProjMatrix.copy(viewport.mViewProjMatrix);
|
mViewProjMatrix.copy(viewport.mViewProjMatrix);
|
||||||
return viewport.getMapPosition(mPos);
|
return viewport.getMapPosition(mPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getMaxScale() {
|
||||||
|
return mMaxScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxScale(double maxScale) {
|
||||||
|
this.mMaxScale = maxScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getMinScale() {
|
||||||
|
return mMinScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinScale(double minScale) {
|
||||||
|
this.mMinScale = minScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxZoomLevel() {
|
||||||
|
return FastMath.log2((int) mMaxScale);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxZoomLevel(int maxZoomLevel) {
|
||||||
|
this.mMaxScale = (1 << maxZoomLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMinZoomLevel() {
|
||||||
|
return FastMath.log2((int) mMinScale);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinZoomLevel(int minZoomLevel) {
|
||||||
|
this.mMinScale = (1 << minZoomLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getMaxTilt() {
|
||||||
|
return mMaxTilt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxTilt(float maxTilt) {
|
||||||
|
this.mMaxTilt = maxTilt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getMinTilt() {
|
||||||
|
return mMinTilt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinTilt(float minTilt) {
|
||||||
|
this.mMinTilt = minTilt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getMaxBearing() {
|
||||||
|
return mMaxBearing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxBearing(float maxBearing) {
|
||||||
|
this.mMaxBearing = maxBearing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getMinBearing() {
|
||||||
|
return mMinBearing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinBearing(float minBearing) {
|
||||||
|
this.mMinBearing = minBearing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getMaxX() {
|
||||||
|
return mMaxX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxX(double maxX) {
|
||||||
|
this.mMaxX = maxX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getMinX() {
|
||||||
|
return mMinX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinX(double minX) {
|
||||||
|
this.mMinX = minX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getMaxY() {
|
||||||
|
return mMaxY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxY(double maxY) {
|
||||||
|
this.mMaxY = maxY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getMinY() {
|
||||||
|
return mMinY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinY(double minY) {
|
||||||
|
this.mMinY = minY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user