Select to view content in your preferred language

Feature Layer Symbology

624
1
11-03-2010 10:30 AM
JasonBrady
New Contributor
I published a map service on an ArcServer 9.3 but when I call the feature layer in the Flex viewer all the symbols become black shadows. If I call the map service I get the symbols. Is there and easy way to adjust the symbology for the feature layer? I'm not a developer and am using the compiled flexviewer.

If not is there a way to use the info pop up widget on a dynamic map service layer?

I hope this makes sense, I'm new to all of this and just trying to publish a basic map with the ability to mouse click a feature to identify some of the attributes. 

Thanks
Jason
Tags (2)
0 Kudos
1 Reply
DavidElies
Deactivated User
if you're not using ArcGIS 10, then the symbology from the map service isn't used.  You can set a default symbol by using the symbol attribute of the FeatureLayer, or you can use a custom Renderer to set different symbols for different attribute values (similar to Categories, Quantities, etc in ArcMap).  Here are some examples.  The second one is straight from http://help.arcgis.com/en/webapi/flex/samples/index.html

<esri:FeatureLayer id="featureLayer"
 url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0" }">
  <esri:symbol>
   <esri:SimpleMarkerSymbol color="0xFFFFFF" alpha="0.8" size="10" style="diamond">
    <esri:outline>
     <esri:SimpleLineSymbol color="0xFF0000" style="dash" />
    </esri:outline>
   </esri:SimpleMarkerSymbol>
  </esri:symbol>
</esri:FeatureLayer>


<esri:FeatureLayer  outFields="[FIPS,POP2000]"
                           url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0">
            <esri:renderer>
                <esri:ClassBreaksRenderer attribute="POP2000">
                    <esri:ClassBreakInfo maxValue="61" symbol="{symbol1}"/>
                    <esri:ClassBreakInfo maxValue="264"
                                         minValue="62"
                                         symbol="{symbol2}"/>
                    <esri:ClassBreakInfo maxValue="759"
                                         minValue="265"
                                         symbol="{symbol3}"/>
                    <esri:ClassBreakInfo maxValue="1900"
                                         minValue="760"
                                         symbol="{symbol4}"/>
                    <esri:ClassBreakInfo minValue="1901" symbol="{symbol5}"/>
                </esri:ClassBreaksRenderer>
            </esri:renderer>
        </esri:FeatureLayer>
0 Kudos