tabs issue resolved

This commit is contained in:
simon 2020-09-04 15:05:03 +03:00
parent 656a316f87
commit 2f1707167c

View file

@ -122,11 +122,11 @@ public class RotatedTileBox {
public double getCenterTileX(){ public double getCenterTileX(){
return oxTile; return oxTile;
} }
public int getCenter31X(){ public int getCenter31X(){
return MapUtils.get31TileNumberX(lon); return MapUtils.get31TileNumberX(lon);
} }
public int getCenter31Y(){ public int getCenter31Y(){
return MapUtils.get31TileNumberY(lat); return MapUtils.get31TileNumberY(lat);
} }
@ -189,7 +189,7 @@ public class RotatedTileBox {
float right = (float) MapUtils.getLongitudeFromTile(zoom, alignTile(tileBounds.right)); float right = (float) MapUtils.getLongitudeFromTile(zoom, alignTile(tileBounds.right));
latLonBounds = new QuadRect(left, top, right, bottom); latLonBounds = new QuadRect(left, top, right, bottom);
} }
private double alignTile(double tile) { private double alignTile(double tile) {
if(tile < 0) { if(tile < 0) {
return 0; return 0;
@ -232,7 +232,7 @@ public class RotatedTileBox {
double yTile = MapUtils.getTileNumberY(zoom, latitude); double yTile = MapUtils.getTileNumberY(zoom, latitude);
return getPixXFromTile(xTile, yTile); return getPixXFromTile(xTile, yTile);
} }
public float getPixXFromTile(double tileX, double tileY, float zoom) { public float getPixXFromTile(double tileX, double tileY, float zoom) {
double pw = MapUtils.getPowZoom(zoom - this.zoom); double pw = MapUtils.getPowZoom(zoom - this.zoom);
double xTile = tileX / pw; double xTile = tileX / pw;
@ -259,7 +259,7 @@ public class RotatedTileBox {
double yTile = MapUtils.getTileNumberY(zoom, latitude); double yTile = MapUtils.getTileNumberY(zoom, latitude);
return getPixYFromTile(xTile, yTile); return getPixYFromTile(xTile, yTile);
} }
public float getPixYFromTile(double tileX, double tileY, float zoom) { public float getPixYFromTile(double tileX, double tileY, float zoom) {
double pw = MapUtils.getPowZoom(zoom - this.zoom); double pw = MapUtils.getPowZoom(zoom - this.zoom);
double xTile = (tileX / pw); double xTile = (tileX / pw);
@ -309,11 +309,11 @@ public class RotatedTileBox {
checkTileRectangleCalculated(); checkTileRectangleCalculated();
return latLonBounds; return latLonBounds;
} }
public double getRotateCos() { public double getRotateCos() {
return rotateCos; return rotateCos;
} }
public double getRotateSin() { public double getRotateSin() {
return rotateSin; return rotateSin;
} }
@ -361,7 +361,7 @@ public class RotatedTileBox {
public double getZoomAnimation() { public double getZoomAnimation() {
return zoomAnimation; return zoomAnimation;
} }
public double getZoomFloatPart() { public double getZoomFloatPart() {
return zoomFloatPart; return zoomFloatPart;
} }
@ -372,7 +372,7 @@ public class RotatedTileBox {
this.zoom = zoom; this.zoom = zoom;
calculateDerivedFields(); calculateDerivedFields();
} }
public void setZoomAndAnimation(int zoom, double zoomAnimation) { public void setZoomAndAnimation(int zoom, double zoomAnimation) {
this.zoomAnimation = zoomAnimation; this.zoomAnimation = zoomAnimation;
this.zoom = zoom; this.zoom = zoom;
@ -391,20 +391,20 @@ public class RotatedTileBox {
MapUtils.getLongitudeFromTile(zoom, alignTile(tileLT.x))); MapUtils.getLongitudeFromTile(zoom, alignTile(tileLT.x)));
} }
public QuadPointDouble getLeftTopTile(double zoom) { public QuadPointDouble getLeftTopTile(double zoom) {
checkTileRectangleCalculated(); checkTileRectangleCalculated();
return new QuadPointDouble((tileLT.x * MapUtils.getPowZoom(zoom - this.zoom)), return new QuadPointDouble((tileLT.x * MapUtils.getPowZoom(zoom - this.zoom)),
(tileLT.y * MapUtils.getPowZoom(zoom - this.zoom))); (tileLT.y * MapUtils.getPowZoom(zoom - this.zoom)));
} }
public QuadPointDouble getRightBottomTile(float zoom) { public QuadPointDouble getRightBottomTile(float zoom) {
checkTileRectangleCalculated(); checkTileRectangleCalculated();
return new QuadPointDouble((tileRB.x * MapUtils.getPowZoom(zoom - this.zoom)), return new QuadPointDouble((tileRB.x * MapUtils.getPowZoom(zoom - this.zoom)),
(tileRB.y * MapUtils.getPowZoom(zoom - this.zoom))); (tileRB.y * MapUtils.getPowZoom(zoom - this.zoom)));
} }
private void checkTileRectangleCalculated() { private void checkTileRectangleCalculated() {
if(tileBounds == null){ if(tileBounds == null){
@ -422,7 +422,7 @@ public class RotatedTileBox {
this.mapDensity = mapDensity; this.mapDensity = mapDensity;
calculateDerivedFields(); calculateDerivedFields();
} }
public double getMapDensity() { public double getMapDensity() {
return mapDensity; return mapDensity;
} }
@ -471,7 +471,7 @@ public class RotatedTileBox {
double ty = getPixYFromTile(qp.x, qp.y); double ty = getPixYFromTile(qp.x, qp.y);
return tx >= 0 && tx <= pixWidth && ty >= 0 && ty <= pixHeight; return tx >= 0 && tx <= pixWidth && ty >= 0 && ty <= pixHeight;
} }
public boolean containsTilePoint(QuadPointDouble qp) { public boolean containsTilePoint(QuadPointDouble qp) {
double tx = getPixXFromTile(qp.x, qp.y); double tx = getPixXFromTile(qp.x, qp.y);
double ty = getPixYFromTile(qp.x, qp.y); double ty = getPixYFromTile(qp.x, qp.y);
@ -483,7 +483,7 @@ public class RotatedTileBox {
double ty = getPixYFromLatLon(lat, lon); double ty = getPixYFromLatLon(lat, lon);
return tx >= 0 && tx <= pixWidth && ty >= 0 && ty <= pixHeight; return tx >= 0 && tx <= pixWidth && ty >= 0 && ty <= pixHeight;
} }
public boolean containsLatLon(LatLon latLon) { public boolean containsLatLon(LatLon latLon) {
double tx = getPixXFromLatLon(latLon.getLatitude(), latLon.getLongitude()); double tx = getPixXFromLatLon(latLon.getLatitude(), latLon.getLongitude());
double ty = getPixYFromLatLon(latLon.getLatitude(), latLon.getLongitude()); double ty = getPixYFromLatLon(latLon.getLatitude(), latLon.getLongitude());
@ -530,7 +530,7 @@ public class RotatedTileBox {
zoomSet = true; zoomSet = true;
return this; return this;
} }
public RotatedTileBoxBuilder setLocation(double lat, double lon) { public RotatedTileBoxBuilder setLocation(double lat, double lon) {
tb.lat = lat; tb.lat = lat;
tb.lon = lon; tb.lon = lon;
@ -592,6 +592,6 @@ public class RotatedTileBox {
+ pixHeight + "]"; + pixHeight + "]";
} }
} }