移动端腾讯地图定位
https://lbs.qq.com/webDemoCenter/javascriptV2/marker/markerAnimation
demo
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <title>设置marker动画</title> <style type="text/css"> html,body{ width:100%; height:100%; } #container{ width:100%; height:90%; } *{ margin:0px; padding:0px; } body, button, input, select, textarea { font: 12px/16px Verdana, Helvetica, Arial, sans-serif; } p{ width:603px; padding-top:3px; margin-top:10px; overflow:hidden; } .btn{ width:112px; } </style> <script charset="utf-8" src="你的Key "></script> <script> function init(){ var center=new qq.maps.LatLng(39.982163,116.306070); var map=new qq.maps.Map(document.getElementById("container"),{ center:center, zoom:16 }); //添加定时器 setTimeout(function(){ var marker=new qq.maps.Marker({ position:center, animation:qq.maps.MarkerAnimation.DROP, map:map }); //添加到提示窗 var info = new qq.maps.InfoWindow({ map: map }); //获取标记的点击事件 qq.maps.event.addListener(marker, 'click', function() { info.open(); info.setContent('<div style="text-align:center;white-space:nowrap;'+ 'margin:10px;">单击标记</div>'); info.setPosition(center); }); },1000); } window.onload=init; </script> </head> <body> <div id="container"></div> <p>两秒钟后一个marker从天而降</p> </body> </html>