2013-02-22 44 views

回答

3

更新:此答案不正確,請參閱Robert的回答。

iOS的Google地圖SDK中似乎沒有任何內容會在用戶位置更改時通知您。

因此,您需要自己使用Core Location(CLLocationManager類)來偵聽位置更改。

4

Hello Google Maps SDK for iOS在類GMSMapView中提供了一個可觀察屬性myLocation。

/** 
* If My Location is enabled, reveals where the user location dot is being 
* drawn. If it is disabled, or it is enabled but no location data is available, 
* this will be nil. This property is observable using KVO. 
*/ 
@property (nonatomic, strong, readonly) CLLocation *myLocation; 

欲瞭解更多信息,請參閱我的答案在: about positioning myself,some problems