Using dbroux's printing sample with GraphicsLayer which has Clusterer renderer

477
4
04-04-2012 07:16 AM
DeminHu
New Contributor
Hi,

I have been using dbrous's  printing sample  and customized it in my applications, it is always great. So here, I want to say I really appreciate his work.

Yesterday  by an acciden, I found  the control had a problem with the GraphicsLayer which has clusterer renderer, for all other graphicslayer are OK, as soon as I removed clusterer renderer, it was OK.

The problem caused the application collapsed, when you open the print control,  the graphics only show either the app ( main browser ) or printing control ( Cloned map) , after toggles a few times, then the app was collapsed, the error showed as the the attachment.

The issue might still related to  ArcGIS server Silverlight API ( about clusterer renderer). If somebody had the same problem and fixed, please let  me know, because I still want to use the clusterer for the GraphicsLayer and the printing control.

Thanks.
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
Hi Demin,

Thanks for your appreciation concerning this sample.

To fix the cluster issue, you can replace this line in CloneMap:

printLayer.Clusterer = fromLayer.Clusterer; // todo : clone ?

by
printLayer.Clusterer = fromLayer.Clusterer == null ? null : fromLayer.Clusterer.Clone();


The 'todo' note is no more useful 🙂
0 Kudos
DeminHu
New Contributor
Hi, Dominique

Thank you so much for the help, it fixed the  problem, now all my manager and clients are happy about it.

If without your sample, I might went to crazy by being asked on printing, your sample really helped a lot on my work !!
0 Kudos
zhuzheng
New Contributor
where i can get the sample? is this sample be about printing graphics with slverlight api?
thank you very much.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
where i can get the sample?

You can get it, here : http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3

is this sample be about printing graphics with slverlight api?

It's about printing a Map that can contain graphicslayers.
0 Kudos