2013-10-29 326 views

回答

0

如果設置了標題或摘錄標記的屬性,則敲擊時,提示會顯示。

marker.title = @"Hello World"; 

和/或

marker.snippet = @"Hello Snippet"; 
1

在它說的appearAnimation屬性GMSMarker Class reference

控制時該標記物被放置在GMSMapView中(默認kGMSMarkerAnimationNone,所用的動畫沒有動畫)。

使用Google Maps SDK for iOS標記可以進行這樣的:

GMSMarker *startMarker = [GMSMarker markerWithPosition:@"NYC"]; 
startMarker.appearAnimation = kGMSMarkerAnimationPop; 
startMarker.title = @"Start"; 
startMarker.snippet = @"My address"; 
startMarker.map = mapView; 
0

爲SWIFT:

locationMarker.appearAnimation = kGMSMarkerAnimationPop 
locationMarker.icon = UIImage(named: "testImage") as UIImage?