var printurl = "http://kris.osnabrueck.de/dienste/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task"; var params = new esri.tasks.PrintParameters(); var printmapvar = map; printmapvar._layers.basemap.url = "http://mydomain.de/dienste/rest/services/dynamic/MapServer"; params.map = printmapvar; var template = new esri.tasks.PrintTemplate(); template.exportOptions = { /*width: 680.31, height: 755.91, dpi: 96*/ width: 2125.98, height: 2362.2, dpi: 300 }; template.format = "jpg"; template.layout = "MAP_ONLY"; template.preserveScale = true; params.template = template; printTask = new esri.tasks.PrintTask(printurl); printTask.execute(params,function(value){ map._layers.basemap.url = "http://mydomain.de/dienste/rest/services/cached/MapServer"; var UrlToMapImage = value.url; alert('success'); },function(){ map._layers.basemap.url = "http://mydomain.de/dienste/rest/services/cached/MapServer"; alert('error'); });
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.