AnsweredAssumed Answered

Print a graphics layer containing points and texts

Question asked by zj_zou on Oct 4, 2013
Latest reply on Oct 8, 2013 by zj_zou
I am using PrintTask in JSAPI 3.6 for the map print. Everything works fine until I want to print a map with a graphics layer that contains points AND texts. The print result varies based on the order in which the points and texts are added to the graphics layer.

For simplicity, let's draw one point first and then one text on the map. On the printout, the point will be displayed correctly, but the text will be displayed using the same symbol as the point. No text string. Ok, let's switch the order. Add the text first and then the point. This time on the printout, the text will be displayed correctly, but the point disappears!

I have tested the behavior via my app and the REST service endpoint, and got the same result. Below is the sample Web_Map_as_JSON string for test for point first then text.

{     "mapOptions": {         "showAttribution": true,         "extent": {             "xmin": -10626238.11274791,             "ymin": 3299637.0692294897,             "xmax": -9574464.603543935,             "ymax": 3846926.191751325,             "spatialReference": {                 "wkid": 102100             }         },         "spatialReference": {             "wkid": 102100         },         "scale": 2311162.2171550025     },     "operationalLayers": [{         "id": "Ocean",         "title": "Ocean",         "opacity": 1,         "minScale": 591657527.591555,         "maxScale": 9027.977411,         "url": "http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer"     }, {         "id": "Boundaries",         "title": "Boundaries",         "opacity": 1,         "minScale": 0,         "maxScale": 0,         "url": "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer",         "visibleLayers": null,         "layers": []     }, {         "id": "map_graphics",         "minScale": 0,         "maxScale": 0,         "featureCollection": {             "layers": [{                 "layerDefinition": {                     "name": "pointLayer",                     "geometryType": "esriGeometryPoint"                 },                 "featureSet": {                     "geometryType": "esriGeometryPoint",                     "features": [{                         "geometry": {                             "x": -10069165.050605573,                             "y": 3702001.586122638,                             "spatialReference": {                                 "wkid": 102100                             }                         },                         "symbol": {                             "color": [0, 255, 0, 191],                             "size": 7.5,                             "angle": 0,                             "xoffset": 0,                             "yoffset": 0,                             "type": "esriSMS",                             "style": "esriSMSSquare",                             "outline": {                                 "color": [0, 0, 0, 255],                                 "width": 1,                                 "type": "esriSLS",                                 "style": "esriSLSSolid"                             }                         }                     }, {                         "geometry": {                             "x": -10056323.629853662,                             "y": 3658585.35405666,                             "spatialReference": {                                 "wkid": 102100                             }                         },                         "symbol": {                             "color": [0, 0, 0, 255],                             "type": "esriTS",                             "angle": "0",                             "xoffset": 0,                             "yoffset": 0,                             "text": "Teest Text",                             "decoration": "none",                             "rotated": false,                             "kerning": true,                             "font": {                                 "size": 16,                                 "style": "italic",                                 "variant": "normal",                                 "weight": "bold",                                 "family": "Arial"                             }                         }                     }]                 }             }]         }     }],     "exportOptions": {         "outputSize": [800, 1100],         "dpi": 96     } }


Does anybody else experience the same problem or only me? Any workaround?

Thanks.

Outcomes