默认显示Google Map API中的标记标题

Vũ *_*Anh 4 google-maps objective-c gmsmapview

我添加了一个标记如下:

marker = [GMSMarker markerWithPosition:desLocation];
marker.title = @"Title";
marker.appearAnimation = kGMSMarkerAnimationPop;
marker.snippet = @"Snippet";
[marker setMap:mapView];
Run Code Online (Sandbox Code Playgroud)

没关系!!但如果我想显示这个标记的标题和片段,我必须点击标记.那么,GMSMapView如何在没有tapper的情况下自动显示标记的标题和片段.

请大家帮忙!

Nun*_*has 9

只需致电:

[mapView setSelectedMarker:marker];
Run Code Online (Sandbox Code Playgroud)

那应该做你想要的.