2

How can I add "drop pin" and the dropping on above animation in Google Map iOS? I can only find marker in SDK, and the appearAnimation property only provides pop up animation.

4

4 回答 4

0

使用MapKit 中的MKAnnotationView。从使用标准注释视图的文档中:

MKAnnotationView* aView = [[[MKAnnotationView alloc] initWithAnnotation:annotation
                              reuseIdentifier:@"MyCustomAnnotation"] autorelease];
于 2013-10-29T05:28:53.783 回答
0

GMSMarker 类参考中,它针对 appendAnimation 属性说:

控制将此标记放置在 GMSMapView 上时使用的动画(默认 kGMSMarkerAnimationNone,无动画)。

使用适用于 iOS 的 Google Maps SDK可以像这样制作标记:

GMSMarker *startMarker = [GMSMarker markerWithPosition:@"NYC"];
startMarker.appearAnimation = kGMSMarkerAnimationPop;
startMarker.title = @"Start";
startMarker.snippet = @"My address";
startMarker.map = mapView;
于 2013-11-24T07:21:08.780 回答
-1

如果您设置标记的标题或片段属性,则工具提示将在点击时显示。

marker.title = @"Hello World";

和/或

marker.snippet = @"Hello Snippet";
于 2013-10-29T10:52:19.877 回答
-1

对于快速:

locationMarker.appearAnimation = kGMSMarkerAnimationPop
locationMarker.icon = UIImage(named: "testImage") as UIImage?
于 2015-12-23T04:42:27.240 回答