2012-03-01 123 views
0

我使用onScrollChanged(int pL, int pT, int pOldl, int pOldt)来限制MapView的滚动。 如何将pL和pT转换为GeoPoint?如何转换ScreenCoordinates至GeoPoints

谢谢。

+0

看看这个答案可以帮助:http://stackoverflow.com/questions/5701824/how-to-convert-coordinates-to-geopoint-format – jlemos 2012-03-01 11:17:40

+0

我看到那篇文章。我需要转换不同的值(int值),例如(101332,-98790,101388,-98590)谢谢。 – user1206529 2012-03-01 12:31:15

回答

1

呼叫getProjection()MapView,并使用所产生的Projection对象fromPixels()转换为您GeoPoint

+0

当我尝试从pL和pT转换时,我得到错误的GeoPoints值:GeoPoint gp =(GeoPoint)getProjection()。fromPixelels(pL,pT); – user1206529 2012-03-01 15:51:22

0

你可以简单的使用方法mapView.setScrollableAreaLimit(BoundingBoxE6) 设置滚动