0
votes

I am using Xcode 8.0. I integrated Google map iOS SDK to my project using CocoaPods.

I enable user current location using via mapView.myLocationEnabled = true; But i need to customize this blue dot image when this screen loading time.

I exactly mean that any delegate method for customize the blue dot mark like in Google Maps instead of Apple map (- (MKAnnotationView *) mapView: (MKMapView *) mapView viewForAnnotation:(id<MKAnnotation>) annotation) iOS SDK.

How to solve this issue?

2
Look into official documentation, scroll down to section "Change the marker color" or "Customize the marker image"Raptor

2 Answers

0
votes

Instantiate the object from class GMSMarker and set the icon property with UIImage of your choice and it should work.

This is is the simplest way of customizing the marker on Google Maps.

0
votes

Not sure if you can change blue dot image. However, there is a work around for the same.

You can hide the default button like this:

mapView.myLocationEnabled = NO;

Create a custom GMSMarker, set it at exact position of user location like this:

 GMSMarker *userLocationMarker = [GMSMarker markerWithPosition: userLocation];
 userLocationMarker.icon = [UIImage imageNamed:@"CustomMarkerImage"];
 userLocationMarker.map = mapView;