Home > front end >  Scott map trajectory
Scott map trajectory

Time:11-29

How to draw the different colors of trajectory is movement while drawing a condition drawing track color change

CodePudding user response:

It is ok to modify strokeColor attribute values
 
//draw the path
Var polyline=new AMap. Polyline ({
Map: the map,
Path: lineArr,
ShowDir: true,
StrokeColor: "red",//line color is the color of the initial here
//strokeOpacity: 1,//line transparency
StrokeWeight: 6,//line width
//strokeStyle: "solid"//line style
});

Var passedPolyline=new AMap. Polyline ({
Map: the map,
//path: lineArr,
StrokeColor: "pink",//line color is the color of the movement after
//strokeOpacity: 1,//line transparency
StrokeWeight: 6,//line width
//strokeStyle: "solid"//line style
});

CodePudding user response:

Thank you! I know I met the business logic of the first half is movement while drawing such as trace is one-time, after the red part is green marker movement while mapped out

CodePudding user response:

https://lbs.amap.com/api/javascript-api/example/marker/replaying-historical-running-data
If such effect

CodePudding user response:

Thank you that's not what effect this is a path to initialize the path and then draw what I need is drawn directly track has a variety of colors

CodePudding user response:

This requirement is very complex, drawn to a certain coordinate record coordinate point to draw a line change the color, rather then write a few array coordinate is put inside, after when the array to draw out an array of line, would you like to do is traffic congestion? Through more than N line joining together the full path,

CodePudding user response:

Is to want to achieve my car outside the electronic fence trajectory is a kind of color within the electronic fence is a kind of color I want is segmented out drawing but it's so complicated
  • Related