Select to view content in your preferred language

How to export the whole map in different scale

3177
5
08-01-2012 11:52 PM
hanwang1
Emerging Contributor
Hi esri flex team

I have a special requirement about map export.

I used the api 3.0 PrintTask to export a web map, this function is amazing, but I am wondering does it work on exporting the whole map
with different scale?for example, there is a map services,the tiled layer scale is 1:10000,1:5000,1:2000,1:1000 and 1:500. I want export the
map as an image and this image shows the full screen map and contains 1:500 details.I guess the size of this image must be very large.

is there any way to realize this requirement?if the answer is yes, could please share me a sample or at least show me some clues like what
kind of methods I should use.

thanks in advance

Han
Tags (2)
0 Kudos
5 Replies
hanwang1
Emerging Contributor
Hi gus

through my researching on PrintTask APIs, I find if you could set the ExportOptions of PrintParameters, then you may export a wider extent than the
current view.

there are three parameters of ExportOptions,dpi, width and height, these three parameters are used for setting the size of export image.theoretically if you set ExportOptions.width and ExportOptions.height as large as possible, then you may export the whole map detail in a large scale.

the default of width and height are the map's width and map's width,I set width and height as twice as map's width and height,run the progrom, the export image shows a larger extent than map current view.but when I set width and height as four times of map's width and height, it returns an error message "HTTP request error".

Could anyone tell me why I meet this error?by the way,My arcgis server 10.1 is prerelease version,does this matter?

Han
0 Kudos
DasaPaddock
Esri Regular Contributor
In the Viewer's PrintWidget, you can specify the scale of the output. Does this produce the results you're looking for?
http://resources.arcgis.com/en/help/flex-viewer/live/index.html

Also, I would recommend upgrading to 10.1 final.
0 Kudos
hanwang1
Emerging Contributor
Hi

I tried the print widget of the viewer, this can not satisfy my requirement, because I want export the whole map in a certain scale, though print widget allows me export a certain scale, the output result is only a part of the whole map.

I read the code of the viewer ,there is a parameter of printparameter named "preserveScale", if you set "preserveScale" as true, the export result would come with the current view scale of the map, if false then you may set a specific scale to export map, and the extent of the map changed along with this scale, if the scale is larger, the extent would be smaller, vice versa.

maybe this functionality could not be realized by flex api, anyway the export result may be a very large image for example if I want to export a 1:1000 Beijing map, the size of the result would be several GBs, and this is far out of arcgis server capability. In this case I need call for help from some professional remote sensing software like envi or erdas.

Han
0 Kudos
DasaPaddock
Esri Regular Contributor
From:
http://resources.arcgis.com/en/help/main/10.1/#/Advanced_printing_for_web_maps/01540000056t000000/

"The PrintingTools service and its client print widgets in the ArcGIS web APIs are intended for basic printing on small paper sizes. If you want to plot maps larger than 11 x 17 inches, consider using a Python script to convert the web map to a map document (MXD).There are a number of arcpy.mapping functions that can take an MXD and export it to various formats for printing on large paper sizes or inclusion in map books."

Here's a tutorial that uses arcpy.mapping:
http://resources.arcgis.com/en/help/main/10.1/#/Tutorial_Basic_high_quality_web_map_printing_exporti...

Hopefully this helps.
0 Kudos
hanwang1
Emerging Contributor
Hi Dasa

your information is very helpful, I would take it into account, and change the technical route or just discuss with the client and cancel

this requirement.

thank you very much

regards,

Han
0 Kudos