{"version":"0.1.0","code":"0000","result":true,"message":"处理成功","errdetail":"","timestamp":1671508816289,"data":{"id":71713640,"title":"2.12 转场动画","slug":"gxgil7","format":"lake","bookId":26046811,"body":null,"body_draft":null,"body_html":"

场景图

场景图.mp4

时序

关键参数

com.autonavi.gbl.map.model.MapPostureParamCache

核心接口

boolean com.autonavi.gbl.map.MapView.startMapPostureCache()


boolean com.autonavi.gbl.map.MapView.cancelMapPostureCache()


void com.autonavi.gbl.map.MapView.flushMapPostureCache(long duration,boolean bClear,long animationId ) 


说明:函数详情,请复制函数名称到在线API搜索


示例代码

//mapview 初始化\n...\n\n//开始组装转场\nmapview.startMapPostureCache()\n    \n//设置地图姿态\nmapview.getOperatorPosture().setMapCenterByLonLat(new Coord3DDouble(116.397496, 39.908696, 0)); /**< 地图中心点(坐标:经纬度) */\n\n//添加组合动画\nAnimationGroupParam groupParam = new AnimationGroupParam();\ngroupParam.lon = 116.474718,;\ngroupParam.lat = 39.994126;\ngroupParam.maplevel = 16;\ngroupParam.mapRollAngle = 0;\ngroupParam.pitchAngle = 65;\nmapView.getOperatorAnimation().addGroupAnimation(groupParam, 500, false, 0);\n\n//设置底图样式\nMapStyleParam styleParam = new MapStyleParam();\nstyleParam.mode = MapStyleMode.MapModeDefault;\nstyleParam.time = MapStyleTime.MapTimeDay;\nstyleParam.state = MapModelConstants.MAP_MODE_SUBSTATE_NORMAL;\nstyleParam.style = MapModelConstants.MAP_STYLE_NORMAL_DAY;\nMapView.getOperatorStyle().setMapStyle(styleParam, false);\n\n//添加导航消息\nNaviMessageParam messageParam = new NaviMessageParam();\nmessageParam.dice::Coord3D<double> mapCenter = new Coord3DDouble(121.499779, 31.239668, 0) /**< 地图中心点(坐标:经纬度) */\nmessageParam.CarLoc = 0.0f;                       /**< 自车标位置信息 */\nmessageParam.carAngle =  0.0f;             \t\t  /**< 小车旋转角度 */\nmessageParam.carAngle3D = 0.0f;\t                  /**< 3D下小车旋转角度 */\nmessageParam.carPitch = 0.0f;                     /**< 小车俯仰角度 */\nmessageParam.mapRollAngle = 0.0f;                 /**< 地图旋转角度 */\nmessageParam.mapPitch = 30.0f;                     /**< 地图俯仰角度 */\nmessageParam.mapLevel = 15.0f;                     /**< 地图级别 */\nmessageParam.pNaviControl = 0;             /**< naviControl句柄 */\nmessageParam.pModeOverlay = 0;             /**< 预留 */\nmessageParam.cacheMessagePolicy = 1;       /**< 0:不启用缓存策略 1:动画进行中缓存NaviMessage择机再执行 */\nMapView.addNaviMessage(messageParam);\n\n//启动转场\nmapview.flushMapPostureCache(500, 0, 1000);

注意事项


","body_lake":null,"pub_level":null,"status":"0","updated_at":"2022-04-06 07:01:56","deleted_at":null,"nameSpace":"mnlcaa/v610","browseCount":134,"collectCount":0,"estimateDate":5,"docStatus":0,"permissions":true,"overView":false}}