ConvertWebMapToMapDocument creates corrupted MapServerLayer in MapDocument

2151
6
06-04-2013 01:09 AM
AlexMerkulov
New Contributor II
Hi everybody,
I'm trying to print my MapService with Advanced Printing described in ESRI's 10.1 help and getting result pdf with missing layers and partially drew picture. My MapService is usual service built from ArcView publisher and contains few datasets inside. All data resides in SQLServer 2008 SDE. Nothing unusual.

I found here two main problems with ConvertWebMapToMapDocument and ExportToPdf arcpy functions.

1. ExportToPdf creates PDF before IActiveView did it refresh, so I see it as partially drew picture where features are missing sometimes on half and sometimes on quarter result map image.
2. ConvertWebMapToMapDocument creates corrupted MapServerLayer.

I spend few days trying to understand what's doing wrong and discover that ConvertWebMapToMapDocument is properly works on x86 ArcVIew Enviroment. So this misbehavior relates to x64 enviroment of ArcGIS Server.

ESRI don't want to take this as a bug.

Somebody has the same problem?

Thanks
Alex
0 Kudos
6 Replies
nicogis
MVP Frequent Contributor
do you run script in background process?
0 Kudos
AlexMerkulov
New Contributor II
Yes.
The advance printing arcpy should run as Geocode service. But this method produces the same corrupted layer.
I did arcpy calls with .Net Process class from SOE x64 process or from x86 process with the same result.
The first dataset in MapServerLayer is ok and others appears like a single node without childs.
If I'm creating this MapServerLayer in MapDocument programmatically this works correctly only on x86 process.
That means i should create service running on machine with ArcView to print. Ridiculous, but I don't see any other option to print maps with layout.
0 Kudos
AlexMerkulov
New Contributor II
Hi everybody,
I'm trying to print my MapService with Advanced Printing described in ESRI's 10.1 help and getting result pdf with missing layers and partially drew picture. My MapService is usual service built from ArcView publisher and contains few datasets inside. All data resides in SQLServer 2008 SDE. Nothing unusual.

I found here two main problems with ConvertWebMapToMapDocument and ExportToPdf arcpy functions.

1. ExportToPdf creates PDF before IActiveView did it refresh, so I see it as partially drew picture where features are missing sometimes on half and sometimes on quarter result map image.
2. ConvertWebMapToMapDocument creates corrupted MapServerLayer.

I spend few days trying to understand what's doing wrong and discover that ConvertWebMapToMapDocument is properly works on x86 ArcVIew Enviroment. So this misbehavior relates to x64 enviroment of ArcGIS Server.


Somebody has the same problem?

Thanks
Alex


I was wrong. The ConvertWebMapToMapDocument also not working correct on x86 process. Only map.add MapServerLayer can be used and only on x86 enviroment. So how I can print Dynamic Map Service with multiple group layers inside with visible layers definitions?
Nobody knows .....
0 Kudos
JeffMoulds
Esri Contributor
I can take a look if you send me the webmap JSON generated from the web app, and your python script.
0 Kudos
AlexMerkulov
New Contributor II
Hi Jeff,
I override this problem by excluding nested datasets from MapDocument. And now is 10.2. I already forgot about this problem.
Not sure if it still exists.
Thanks for reply,
Alex
0 Kudos
RiinaPakarinen
New Contributor II
Hi Alex

We have exactly the same problem.
The client sends the WebMapJson to our printing process. The printing process then converts this JSON in a web map document which we export.
If the map is rotated and we print with at least 300 dpi, the map is only partially drawn. Points and Lines are sometimes cut or even missing completely.

In our case it seems to be only if the map is rotated with high resolution (>=300 dpi). With lower resolution it works in ArcMap and in ArcGIS Server 10.1.

Did you found a way to solve it with ArcGIS 10.1? What did you mean with nested datasets?

Regards
Lorenz
0 Kudos