mirror of
https://github.com/mollyim/osmdroid.git
synced 2025-05-13 07:10:36 +01:00
Make projection conversion methods public (#842)
This commit is contained in:
parent
34741aad1a
commit
cb151289f0
1 changed files with 13 additions and 5 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue