Closed OnePunchManGhy closed 9 months ago
playfinish,https://github.com/maptalks/maptalks.routeplayer/blob/gh-pages/dist/maptalks.routeplayer.js 文件下this.fire的参数都能监听
routePlayer.on("playing", (param) => { console.log(param); map.setView({ center: [param.coordinate.x, param.coordinate.y], zoom: 20, pitch: 10 }); if (param.target.player.playState === 'finished') { routePlayer.cancel() } // map.setCameraPosition({ // position: [param.coordinate.x, param.coordinate.y, param.coordinate.z], // pitch: getPitch(map, param.pitch), // bearing: -param.bearing - 90, // }) }) 好像只能这样判断
试了player.on('finish'),finished,animateend,playend都不行