如何将动画应用于GMSMarker [英] How to apply animations to GMSMarker

查看:118
本文介绍了如何将动画应用于GMSMarker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过使用适用于iOS的Google Maps SDK V1.1.0将iOS地图迁移到Google地图来更改我的应用程序,并且尝试在添加/删除时为标记添加动画效果,但是在相关文档中未找到任何建议为此,请建议我如何在GMSMarkers上执行动画

I’m changing my app by migrating iOS maps to google maps using Google Maps SDK for iOS V1.1.0 and I’m trying to animate the markers while adding/removing but I didn’t find any suggestions in the documentation related to this, Please suggest me how to perform the animations on GMSMarkers

推荐答案

对于appearAnimation属性,它表示GMSMarker类参考:

In the GMSMarker Class Reference, it says, for the appearAnimation property:

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

Controls the animation used when this marker is placed on a GMSMapView (default kGMSMarkerAnimationNone, no animation).

使用 iOS版Google Maps SDK ,可以像这样创建标记:

Using the Google Maps SDK for iOS, a marker can be made like this:

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

这篇关于如何将动画应用于GMSMarker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆