WeChat Mini Programs map track drawing flicker


1. Development environment mpvue + WeChat Mini Programs . There is a flicker problem when the track in
2. markers is drawn by timer .
3. Specific code

        <map id="map" :longitude="longitude" :latitude="latitude"  :scale="localScale"  :polyline="polyline"   :markers="localMarker" style="width: 100%; height: 88%;">
            let  show= () => {
                this.playTrajectory=setTimeout(() => {
                    // console.log(this.polyline[0].points[this.markerIndex].longitude,this.polyline[0].points[this.markerIndex].latitude)
                    // this.movePoints(this.polyline[0].points[this.markerIndex].longitude,this.polyline[0].points[this.markerIndex].latitude)
                    this.localMarker[1].latitude= this.polyline[0].points[this.markerIndex].latitude
                    this.localMarker[1].longitude= this.polyline[0].points[this.markerIndex].longitude
                    this.markerIndexPP;
                    if(this.markerIndex<this.polyline[0].points.length){
                        show()
                    }else{
                        this.changeIcon=playIcon;
                        this.markerIndex=0;
                        this.isPlayNow=false;
                    }
                },200)
            }
            if(this.isPlayNow){
                clearTimeout(this.playTrajectory);
            }else{
                show();
            }

4. Try to move the coordinate point to the next destination via the official API mapCtx.translateMarker (the code comments section above). But there are no eggs, not even moving, always flickering in place.
specific code:

        movePoints(lon,lat) {
            let mapCtx = wx.createMapContext("map");
            mapCtx.translateMarker({
                markerId:0,
                destination:{longitude:lon,latitude:lat},
                autoRotate:true,
                rotate:0
            })            
        },

Hello, I am also trying to use the translateMarker method to continuously move the icon to achieve track playback function, but did not achieve, how do you move the red icon in gif? Thank you


I would like to ask the author how to achieve this playback function?


Lou Lou, I also want a code reference to learn, O () O Thank you, Baidu network disk failed


what did you do? Is it convenient for the landlord to open source for everyone to learn?


can give the completed code, refer to


I use the monitoring real-time position API to draw the motion track is also flickering, stop monitoring will be fine, I do not know how, has the landlord encountered


excuse me, has this flashing problem been solved?


Boss, I would like to ask this does not need any framework development, directly is the js development trajectory, how to write, is there demo, yours is mpvue, I am not familiar with

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30f7a-2bd4a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30f7a-2bd4a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?