当你的才华还撑不起你的梦想时,你只能一直前进!

百度地图路书

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

 

posted @ 2019-07-22 17:25  One'-_-'Piece  阅读(1715)  评论(0编辑  收藏  举报