Make projection conversion methods public (#842)

This commit is contained in:
Martin Perebner 2018-01-06 00:33:05 +01:00 committed by spyhunter99
parent 34741aad1a
commit cb151289f0

View file

@ -543,35 +543,35 @@ public class Projection implements IProjection {
/**
* @since 5.6.6
*/
private int getScreenCenterX() {
public int getScreenCenterX() {
return (mIntrinsicScreenRectProjection.right + mIntrinsicScreenRectProjection.left) / 2;
}
/**
* @since 5.6.6
*/
private int getScreenCenterY() {
public int getScreenCenterY() {
return (mIntrinsicScreenRectProjection.bottom + mIntrinsicScreenRectProjection.top) / 2;
}
/**
* @since 5.6.6
*/
private long getMercatorXFromPixel(final int pPixelX) {
public long getMercatorXFromPixel(final int pPixelX) {
return pPixelX - mOffsetX;
}
/**
* @since 5.6.6
*/
private long getMercatorYFromPixel(final int pPixelY) {
public long getMercatorYFromPixel(final int pPixelY) {
return pPixelY - mOffsetY;
}
/**
* @since 5.6.6
*/
private long getCleanMercator(final long pMercator, final boolean wrapEnabled) {
public long getCleanMercator(final long pMercator, final boolean wrapEnabled) {
return TileSystem.getCleanMercator(pMercator, mMercatorMapSize, wrapEnabled);
}
@ -582,6 +582,14 @@ public class Projection implements IProjection {
return mCurrentCenter;
}
public long getOffsetX() {
return mOffsetX;
}
public long getOffsetY() {
return mOffsetY;
}
/**
* @since 6.0.0
*/