AnsweredAssumed Answered

PrintTask not printing polyline

Question asked by ssdema on Jun 2, 2014
Latest reply on Jun 3, 2014 by jeff.pace
I am trying to create a polyline symbol, add it to a map, and then use PrintTask to create a jpg.
Everything appears to be ok on screen, but when I run the print task, the lines are not there (see attachments).
Has anyone seen this before?

//create vertical line
var point1 = new esri.geometry.Point(xLoc, 1920322.017, CountyMap.spatialReference);
var point2 = new esri.geometry.Point(xLoc, 1795070.155, CountyMap.spatialReference);
var line = new esri.geometry.Polyline(CountyMap.spatialReference);
line.addPath([point1, point2]);
var lineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 2);
LineGraphic = new esri.Graphic(line, lineSymbol)

//add vertical line to CountyMap
CountyVLineLayer = new esri.layers.GraphicsLayer();
var CountyVLineRenderer = new SimpleRenderer(lineSymbol);
CountyVLineLayer.setRenderer(CountyVLineRenderer);
CountyMap.addLayer(CountyVLineLayer);
CountyVLineLayer.add(LineGraphic);

//create horizontal line
var point1 = new esri.geometry.Point(834451.011, yLoc, CountyMap.spatialReference);
var point2 = new esri.geometry.Point(949493.516, yLoc, CountyMap.spatialReference);
var line = new esri.geometry.Polyline(CountyMap.spatialReference);
line.addPath([point1, point2]);
var lineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 2);
LineGraphic = new esri.Graphic(line, lineSymbol)

//add vertical line to CountyMap
CountyHLineLayer = new esri.layers.GraphicsLayer();
var CountyHLineRenderer = new SimpleRenderer(lineSymbol);
CountyHLineLayer.setRenderer(CountyHLineRenderer);
CountyMap.addLayer(CountyHLineLayer);
CountyHLineLayer.add(LineGraphic);

Attachments

Outcomes