Northwest and SouthEast coordinates of mapView
Hello i m Working On Application That Requires Northwest and Southeast Coord开发者_运维百科inates of Mapview when i zoom or pan around map...i want to calculate distance between this two Geopoints...
Guide Me Please...
Thanx..
You can get TopLeft and BottomRight coordinate of screen and project it to geographical coordinates. For this you need to know about size of MapView, because if you get 0;0 as TopLeft and screenHeight;screenWidth as BottomRight you will be disappointed. This is because MapView do not fill the whole screen of device, because always there is notification panel and in some applications there is title bar. So, but if you get height of MapView by calling method getHeight(), for example, in onCreate or onStart you will get 0, because MapView has not been drawn. You need to inherit from MapView and override onLayout(boolean changed, int left, int top, int right, int bottom)
精彩评论