<esri:FeatureLayer id="fLayer" definitionExpression="STATE_NAME='North Carolina'" mode="snapshot" outFields="[MALES,FEMALES,NAME,MED_AGE,CNTY_FIPS]" symbol="{countySymbol}" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3"/>
Thanks a lot! It seems I can not change layer's background or outline, the only way to change that is when I creating map server?
var myFL:FeatureLayer = new FeatureLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3"); myFL.definitionExpression = "STATE_NAME='North Carolina'"; myFL.mode = "snapshot"; myFL.outFields= [MALES,FEMALES,NAME,MED_AGE,CNTY_FIPS]; myFL.symbol = countySymbol; map.addLayer(myFL);
I would like to add a feature layer to the flex viewer so that I can see the layer with a highlighted color. It is not a widget, basically just adding a layer, a feature layer. For example, <esri:FeatureLayer id="fLayer" definitionExpression="STATE_NAME='North Carolina'" mode="snapshot" outFields="[MALES,FEMALES,NAME,MED_AGE,CNTY_FIPS]" symbol="{countySymbol}" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3"/> I put this code in the index.mxml, tried inserting the code inside the <viewer:ViewerContainer> or outside of it, but it never show up on the map. Should I go to config.xml, but how to add a feature layer in config file? Million thanks!
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.