2011-08-31 90 views
0

我可以通過self.mapView.visibleMapRect獲取mapView的可視矩形,但是如何獲得稍微超出此矩形的區域的矩形?如何獲取mapview可視區域周圍的區域?

--------------------- 
|     | 
|     | 
| ----------  |  * the map shown on the screen 
| |  |  | 
| | * |  | 
| |  |  | 
| ----------  | 
|     | 
|     | <- the rect that I want 
--------------------- 

回答

0

這取決於你所說的'我想要的矩形'。你在談論父視圖(或窗口)嗎?如果是父視圖,並且您從視圖控制器訪問它,則可以使用self.view.frame。你需要澄清你在追求什麼領域。

+0

我的意思是coords或rect,比屏幕上顯示的地圖更大的區域 – cannyboy

+0

我對此並不是100%,但可視區域外的mapview區域不斷變化。你試圖達到什麼目的 - 可能有另一種方式來實現它。 – Simon