我怎样才能确定一个GeoPoint对象显示在当前的可视区域?可视、对象、区域、GeoPoint

2023-09-12 08:58:48 作者:不比从前快乐

说我在我的Andr​​oid应用程序的MapView控制。如果我知道一个里程碑式的存在,在一定的纬度和经度,我怎么能确定该地标是当前可查看用户的屏幕上?有用于获取的坐标为可见区域的左上角和右下角的方法?

Say I have mapview control in my Android app. If I know a landmark exists at a certain latitude and longitude, how can I determine if that landmark is currently viewable on the user's screen? Is there a method for getting the coordinates for the top left and bottom right corners of the visible area?

推荐答案

您可以投影的GeoPoint来点,检查它是否箱(0,屏幕宽度)为(0,屏幕高度)

You can project GeoPoint to Point and check if it is box (0, screen width) by (0, screen height)

请参阅:的https://developer.android.com/reference/com/google/android/gms/maps/Projection.html

 
精彩推荐
图片推荐