为当前位置自定义Google地图蓝点

Nic*_*Roy 10 google-maps google-maps-markers ios currentlocation google-maps-sdk-ios

我正在使用2013版Google Maps SDK for iOS.我想自定义当前位置的默认蓝点与另一个图标或周围的脉冲圈.

我知道我们可以mapView:viewForAnnotation:在MKMapView中做到这一点,但我不知道如何使用谷歌地图.

Ras*_*spu 15

使用当前版本的SDK(1.4.3)无法做到这一点,实际上这个请求存在一个未解决的问题:请看这里.

作为解决方法,您可以隐藏默认按钮:

 _map.myLocationEnabled = NO;
Run Code Online (Sandbox Code Playgroud)

然后创建一个自定义 GMSMarker

 GMSMarker *pointMarker = [GMSMarker markerWithPosition:currentPosition];
 pointMarker.icon = [UIImage imageNamed:@"YourImage"];
 pointMarker.map = _map;
Run Code Online (Sandbox Code Playgroud)

并使用a更改它的位置CLLocationManager,因此它始终显示当前位置.它有点棘手,但我能想到的唯一方法是你可以做到这一点.如果您需要更完整的示例,请告诉我.