Search code examples
iosswiftgoogle-mapsgoogle-maps-sdk-ios

Change color of googleMaps current location icon/marker


I am using googleMapsApi in a swift project. I was wondering if it is possible to change the color of the marker or icon that shows the users current location. I understand how to add a custom marker with images, colors, shapes etc.. but the default current location marker that is blue can I change to be red or any other color?


Solution

  • No, there is no official way to replace the blue current location dot in GMSMapView.

    The only way to achieve this is by removing the blue dot by setting mapView.myLocationEnabled to false and then create a custom GMSMarker with the design you want and place it on the current location position on the map.