百度地图路书


<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