Main code below
map. AddEventListener (' mousemove ', function (e) {
Var t=new BMap. Point (e.p oint, LNG, e.p oint. Lat);
Map. RemoveOverlay (mk);
Mk.=new BMap Marker (t, {icon: myIcon, rotation: 0, the title: '11111'});//create a standard logo
The map. The addOverlay (mk);//add annotation to the map in the
Var polyline=new BMap. Polylines ([
Last_point,
T
] and {strokeColor: "blue", strokeWeight: 2, strokeOpacity: 0.5});//create the line
The map. The addOverlay (polylines);
Last_point=t;
})
Is according to the new coordinates and the coordinates of the attachment before, constantly adding mulch on layer before why can be according to the layer scale corresponding changes to draw the trajectory is chaos