Google maps sdk ios 如何为用户位置添加侦听器google maps sdk for iOS

Google maps sdk ios 如何为用户位置添加侦听器google maps sdk for iOS,google-maps-sdk-ios,Google Maps Sdk Ios,如何为用户位置更改添加侦听器google maps sdk for iOS?更新:此答案不正确,请参阅Robert的答案 Google Maps SDK for iOS中似乎没有任何东西可以在用户位置发生变化时通知您 因此,您需要自己使用Core Location(类)来侦听位置更改。您好,Google Maps SDK for iOS在类GMSMapView中提供了一个可观察的属性myLocation /** * If My Location is enabled, reveals wher

如何为用户位置更改添加侦听器google maps sdk for iOS?

更新:此答案不正确,请参阅Robert的答案

Google Maps SDK for iOS中似乎没有任何东西可以在用户位置发生变化时通知您


因此,您需要自己使用Core Location(类)来侦听位置更改。

您好,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;
有关更多信息,请参阅我的答案: