高德地图js api模仿打车软件汽车实时位置及轨迹运动效果代码
代码语言:html
所属分类:其他
代码描述:高德地图js api模仿打车软件汽车实时位置及轨迹运动效果代码
代码标签: api 模仿 打车 软件 汽车 实时 位置 及 轨迹 运动 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> <title>轨迹回放</title> <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css"/> <style> html, body, #container { height: 100%; width: 100%; } .input-card .btn{ margin-right: 1.2rem; width: 9rem; } .input-card .btn:last-child{ margin-right: 0; } </style> </head> <body> <div id="container"></div> <div class="input-card"> <h4>轨迹回放控制</h4> <div class="input-item"> <input type="button" class="btn" value="开始动画" id="start" onclick="startAnimation()"/> <input type="button" class="btn" value="暂停动画" id="pause" onclick="pauseAnimation()"/> </div> <div class="input-item"> <input type="button" class="btn" value="继续动画" id="resume" onclick="resumeAnimation()"/> <input type="button" class="btn" value="停止动画" id="stop" onclick="stopAnimation()"/> </div> </div> <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=243687cce3d5ac3f7a3b4bb90a97fda1"></script> <script> var marker, lineArr = [[116.478935,39.997761],[116.478939,39.997825],[116.478912,39.998549],[.........完整代码请登录后点击上方下载按钮下载查看
网友评论0