Select to view content in your preferred language

Rendering FeatureLayer based on pre-defined symbology?

1969
6
08-04-2010 08:36 PM
StephenLead
Honored Contributor
The sample at http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#FeatureLayerRende... shows how to add a FeatureLayer to the map.

This sample hard-codes the symbology - but is it possible to access the symbology (and other properties) which were defined in ArcMap, then published to ArcGIS Server?

Eg my services catalog shows a layer with properties like:

Min. Scale: 100000
Drawing Info:
Renderer: Simple Renderer:
Symbol: Picture Marker Symbol:

Can I use these programatically, without having to hard-code them?

Thanks,
Steve
0 Kudos
6 Replies
JenniferNery
Esri Regular Contributor
I believe the sample was written to show how you can define a renderer using the API. If your FeatureLayer already has a renderer, you do not need to overwrite it.

Jennifer
0 Kudos
StephenLead
Honored Contributor
Hi Jennifer,

Thanks for the info. I don't have access to an ArcGIS Server 9.3.1 machine to test this - I'm running ArcGIS Server 10, which apparently doesn't connect with the version of Silverlight/Visual Studio that I'm using.

I'm hoping to upgrade shortly - but in the meanwhile, can you point me at a sample ArcGIS Server 9.3.1 service which has the symbology already set?

As far as I can see, all of the services under http://serverapps.esri.com/ArcGIS/rest/services are either Tiled, or don't have symbology (unless I'm missing something).

Thanks again,
Steve
0 Kudos
JenniferNery
Esri Regular Contributor
Oh you are right, the Renderer is new to ArcGIS 10.

I was going to point you to this http://sampleserver3.arcgisonline.com/ArcGIS/rest/services Notice that there is a "DrawingInfo" section that defines the renderer.

This is the only ArcGIS 9.3.1 that I know about
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services

Jennifer
0 Kudos
StephenLead
Honored Contributor
Oh you are right, the Renderer is new to ArcGIS 10.


Cool, I'll upgrade my VS and SL toolkit and try again using AGS 10.

thanks for the help,
Steve
0 Kudos
linusang
Emerging Contributor
Hi,

Where can i find the information for this ArcGIS 10 renderer?

Does it mean that the FeatureLayer will use the symbol it uses in ArcMap?
0 Kudos
JenniferNery
Esri Regular Contributor
Does it mean that the FeatureLayer will use the symbol it uses in ArcMap?


Yes, if the rest endpoint created by your published service contains a renderer, this will be picked up by the SL/WPF API.  For example: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/F... This FeatureLayer includes a Unique Value Renderer (see Drawing Info).

For more information on what is new to the ArcGIS 10 Rest API, you can visit this link:http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/index.html

Jennifer
0 Kudos