Hello,I'm trying to draw a line on the map using the addPath method. Here's the code snippet (using v1.6):
var line = new esri.geometry.Polyline(new esri.SpatialReference( {wkid:102100} ));
var path = new Array();
for (i=0; i<xPoints.length; i++)
{
coords = '[' + xPoints + ',' + yPoints + ']';
path.push(coords);
}
alert(path);
line.addPath(path);
alert(line.paths);
The first alert shows the path formatted like this:[-10993319,4632566],[-10907471,4612961]which seems correct to me.However, the second alert (after the path is added to the polyline) only shows 3 commas (,,,) so the path doesn't get added and the line doesn't draw.Any ideas appreciated.Mike