简体   繁体   English

Android:如何获取MapView的屏幕坐标(可见区域)?

[英]Android: How to get my MapView's Screen coordinates (the visible region)?

I want to get coordinates from set pixel from mapView. 我想从mapView的设置像素中获取坐标。

In this code I get coordinates, but it's for the next region: 在此代码中,我获得了坐标,但它用于下一个区域:

mapView.getProjection().fromScreenLocation(point);

You should consider use Google maps api v2 and use a fragment instead a simple mapview The info that you need is here 您应该考虑使用Google maps api v2,并使用片段而不是简单的mapview。您需要的信息在这里

https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/LocationSource https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/LocationSource

I hope that it can help you 希望对您有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM