Hello,
I am trying to print a map using a print service. I have followed the example on the ArcGIS site namely:
Print templates with esri.request | ArcGIS API for JavaScript
However I can't get it to work using a local feature layer.
Can someone please give some advice.
Thanks
Frank
This is what I have done so far:
parser.parse();
app.printUrl = "http://aphrodite/arcgis/rest/services/Layout/WSC_LAYOUT1/GPServer/Export%20Web%20Map";
esri.config.defaults.io.corsEnabledServers.push("local_server");
app.map = new Map("map");
//Base map
var basemap = new ArcGISDynamicMapServiceLayer("http://local_server/arcgis/rest/services/NAME/Basemap/MapServer/");
basemap.setVisibleLayers([0, 1, 2, 3, 4, 5, 6, 7]);
app.map.addLayer(basemap);
// add graphics for feature
var url = "http://local_server/arcgis/rest/services/NAME/NAME/FeatureServer/n";
var pipeFeatureLayer = new FeatureLayer(url, {
"mode": FeatureLayer.MODE_SNAPSHOT
});
app.map.addLayer(pipeFeatureLayer);