DanielVE


Hi,

I want to display travel data and colorize the polyline I use accordingly to the speed information I possess. As far as I know a polyline can only have one color. How would you solve this problem Draw multiple polylines with the according color

Thanks

Daniel




Re: How to colorize a polyline (with multiple colors)

Derek Chan


Daniel,

Are you referring to route polylines







Re: How to colorize a polyline (with multiple colors)

SoulSolutions

I read it as wanting the different segments of the line different colours. I think drawing sperate lines is the only solution supported. You could dig deeper into the shape object to see if it is possible but it maybe a waste of time.

John.







Re: How to colorize a polyline (with multiple colors)

Derek Chan

Drawing separate lines is probably the best route, although I have spent some time investigating the latter.

If you really want to modify the shape object (not recommended), you need a good understanding of VML (which IE uses) and SVG (FireFox). Then you'll have to break it down into two cases, each with browser checking in your app.

It will take you a ton of lines to generates the same code to just draw separate lines through the supported API and since you'll have the segment points to draw the polyline, doing it through the API shouldn't be too difficult




Re: How to colorize a polyline (with multiple colors)

DanielVE

Thank you for your answers! I am going to draw using different polyline.

Regards

Daniel