我正在尝试将应用从googlemap 2.2
移植到osmdroid 3.0.8
。
我在MapView中遇到了以下代码:
Projection proj = getProjection();
GeoPoint topLeft = proj.fromPixels(0, 0);
GeoPoint bottomRight = proj.fromPixels(getWidth()-1, getHeight()-1);
使用osmdroid,topLeft始终处于北极。
在OSM中有不同的方法来处理它吗?
答案 0 :(得分:1)
在OsmDroid中,您可以使用mapView.getScreenRect查找屏幕的左上角。