Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!!

like image 877
Jonny Vu Avatar asked Jan 12 '23 15:01

Jonny Vu


1 Answers

Just call:

[mapView setSelectedMarker:marker];

That should do what you want.

like image 52
Nuno Vinhas Avatar answered Jan 19 '23 09:01

Nuno Vinhas