I'm using a 2013 version of Google Maps SDK for iOS. I would like to customize the default blue dot for current location with another icon or pulsing circles around.
I know we can do that with mapView:viewForAnnotation:
in MKMapView, but I can't found out how to do it with Google Maps.
For Swift 4.0
When you setup your GMSMapView:
And when user location is updated:
Swift 4
Use this only as a starting point! This is not an attractive alternative because the constant updating of the marker's position on the map comes with a performance hit. If you were to go this route, find a way not to constantly update the marker's position from the location manager delegate.
There is no way to do this with current version of the SDK (1.4.3), and actually there is an open issue with this request: Look here.
As a work around, you can hide the default button with:
Then create a custom
GMSMarker
And change the position of it using a
CLLocationManager
, so it always show the current position. It's a bit tricky but is the only way, I could think, that you can achieve this. If you need a more complete example let me know.