0

I need a custom marker in google maps,I found a link which is in Android How to make a Google Map Marker with a photo inside round speech-bubble?. Can anyone give me idea how I can do in objective - c.

Paulw11
  • 108,386
  • 14
  • 159
  • 186
Shangari C
  • 792
  • 1
  • 5
  • 17
  • see this for help pa : https://stackoverflow.com/questions/40210145/google-maps-ios-sdk-custom-icons-to-be-used-as-markers – Anbu.Karthik Oct 23 '18 at 06:57

2 Answers2

1

Use iconView property of GMSMarker to render the customized view as marker.

Code:

UIImage *picture = [UIImage imageNamed:@"Your Picture"];
picture = [picture imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
UIImageView *pictureView = [[UIImageView alloc] initWithImage: picture];
pictureView.tintColor = [UIColor redColor];

CLLocationCoordinate2D position = CLLocationCoordinate2DMake(51.5, -0.127);
GMSMarker *marker = [GMSMarker markerWithPosition:position];
marker.iconView = pictureView;
marker.tracksViewChanges = YES;
marker.map = self.mapView;

For more, please visit https://developers.google.com/maps/documentation/ios-sdk/marker

enter image description here

Sateesh Yemireddi
  • 4,289
  • 1
  • 20
  • 37
0

Try this

CLLocationCoordinate2D position = CLLocationCoordinate2DMake(51.5, -0.127);
GMSMarker *london = [GMSMarker markerWithPosition:position];
london.title = @"London";
london.icon = [UIImage imageNamed:@"house"];
london.map = mapView;
Ramprasath Selvam
  • 3,868
  • 3
  • 25
  • 41