问题遇到的现象和发生背景
轨迹与地图不匹配
问题相关代码,请勿粘贴截图
因字数过多删去了大部分经纬度数据
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=jipmCMz1Z97ATa396MynmctMWvfl8ObL"></script>
<title>route</title>
</head>
<body>
<div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
var map = new BMap.Map("allmap");
var point = new BMap.Point(113.90420611869588 , 22.476210155377533);
map.centerAndZoom(point, 15);
var polyline = new BMap.Polyline([
new BMap.Point( 113.90420611869588 , 22.476210155377533 ),
new BMap.Point( 113.90420611869588 , 22.476210155377533 ),
new BMap.Point( 113.90420611869588 , 22.476210155377533 ),
new BMap.Point( 113.90420611869588 , 22.476210155377533 ),
new BMap.Point( 113.90420611869588 , 22.476210155377533 ),
new BMap.Point( 113.90420611869588 , 22.476210155377533 ),
new BMap.Point( 113.90420611869588 , 22.476210155377533 ),
new BMap.Point( 113.90420611869588 , 22.476210155377533 ),
new BMap.Point( 113.90420611869588 , 22.476210155377533 ),
new BMap.Point( 113.90420611869588 , 22.476210155377533 )
], {strokeColor:"blue", strokeWeight:6, strokeOpacity:0.5});
map.addOverlay(polyline);
</script>
运行结果及报错内容
正常的轨迹图:
运行出来的轨迹图:
我想要达到的结果
希望能使轨迹不漂移