如何保存我的 MapView 的屏幕坐标? (可见矩形左上角和缩放级别) 我想在一段时间后重新加载该坐标。我该怎么做?
谢谢,莱斯利
最佳答案
我不知道您是否找到了问题的答案,所以我将向您展示我的解决方案。我已将以下代码作为 MapView 类的子类。
GeoPoint topLeft = this.getProjection().fromPixels(getLeft(), getTop());
GeoPoint bottomRight = this.getProjection().fromPixels(getRight(), getBottom());
int topLat = topLeft.getLatitudeE6();
int topLng = topLeft.getLongitudeE6();
int bottomLat = bottomRight.getLatitudeE6();
int bottomLng = bottomRight.getLongitudeE6();
希望对您有所帮助。
关于Android 如何获取我的 MapView 的屏幕坐标? (可见矩形),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7467621/