<script type="text/javascript" src="https://api.map.baidu.com/library/LuShu/1.2/src/LuShu_min.js"></script>
lushu = new BMapLib.LuShu(map, pointArray, {
defaultContent: '',//顯示信息
autoView: true,//是否開啟自動視野調整,如果開啟那么路書在運動過程中會根據視野自動調整
icon: new BMap.Icon('/static/img/arrow.png', new BMap.Size(30, 30)),
speed: speed,//速度
enableRotation: false, //是否設置marker隨着道路的走向進行旋轉
landmarkPois: []
});
/**
* 路書播放
*/
function start() {
stopAllPoly();
if (lushu) lushu.start();
}
/**
* 路書暫停
*/
function pause() {
if (lushu) lushu.pause();
}
/**
* 路書停止
*/
function stop() {
if (lushu) lushu.stop();
}