Select to view content in your preferred language

how to export/print clustered FeatureLayer point graphics

715
2
12-01-2011 06:44 AM
deleted-user-Ohz6rwd1kavx
Deactivated User
Hi,

I've been working with Silverlight FeatureLayer point clustering, which is a _really_ nice feature by the way. Here is the ESRI sample that I started with:

http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerRendering

Anyway, my question:

How can I show point clusters in my print/pdf export? I have modified the code to use a SimpleMarkerSymbol. That's working.

The problem is shown below. When I iterate on layer graphics, I get unclustered graphics. I want the clustered graphics.

            foreach (GraphicsLayer gl in lyrs)
            {
                if (gl == null || gl.Graphics == null || gl.Graphics.Count == 0) continue;
                Symbol symbol = null; 
                foreach (Graphic g in gl.Graphics)
                {


Even though I see clusters on my map (drawn by FeatureLayer), gl.Graphics count shows that these are the unclustered graphics. (g.Symbol also confirms this. I don't get the cluster symbol, I get the orig renderer symbol).

a) Does anyone know how to make this work?

b) Will IRenderer.GetSymbol(graphic) return the clustered symbol? If so, how can I access the "cluster definition", that is which graphics are in which clusters? Does the renderer know anything about the clusterer?

c) are there FeatureLayer/GraphicLayer members that I could use?

d) ... about the only other idea I have is rather heavy-handed. I could always maintain the set of "last drawn" cluster graphics. That'd be possible by overriding this method of GrahpicsCluster (as demonstrated in the above sample).

protected override Graphic OnCreateGraphic(GraphicCollection cluster, MapPoint point, int maxClusterCount)
        {

Hoping for some help/ideas here.
 
Thanks,
 
-Cory
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
Are you talking about this printing sample? http://help.arcgis.com/en/webapi/silverlight/3.0/samples/start.htm#ExportWebMap. If yes, we only support symbols that the REST API supports http://atlas.resources.ca.gov/ArcGIS/SDK/REST/symbol.html.
0 Kudos
GaryBushek
Deactivated User
Cory,
   Did you ever figure out part A of this post?  Im trying to do something similar.

Thanks
0 Kudos