Jonny Vu
Jonny Vu

Reputation: 1428

Default show the title of marker in Google Map API

I have added a marker as the following:

marker = [GMSMarker markerWithPosition:desLocation];
marker.title = @"Title";
marker.appearAnimation = kGMSMarkerAnimationPop;
marker.snippet = @"Snippet";
[marker setMap:mapView];

It's OK!! But if i want to show the title and snippet of this marker, i have to tap on the marker. So, how could the GMSMapView show the marker's title and snippet automatically without tapper.

Tks for all help!!

Upvotes: 5

Views: 3510

Answers (1)

Nuno Vinhas
Nuno Vinhas

Reputation: 528

Just call:

[mapView setSelectedMarker:marker];

That should do what you want.

Upvotes: 9

Related Questions