百度地圖路書


<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();
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM