Select to view content in your preferred language

Initialize Feature Layer

2194
1
03-27-2014 07:16 AM
LauraMiles1
Frequent Contributor
Hi, I'm trying to initialize my feature layer, and I'm getting the error on the last line (myVisibleFeatureLayers) saying "cannot implicitly convert type 'string[]' to 'ESRI.ArcGIS.Client.FeatureLayer'".

I'm pretty new to Silverlight, not sure what I'm doing wrong? I have copied the code for initializing a WMS layer and tried to modify it to work for a feature layer.

        private void FeatureLayerDockPhotos2011_Initialized(object sender, EventArgs e)
        {
            ESRI.ArcGIS.Client.FeatureLayer myFeatureLayerDockPhotos2011 = null;
            myFeatureLayerDockPhotos2011 = (ESRI.ArcGIS.Client.FeatureLayer)Map.Layers["FeatureLayerResDockPhotos2011"];

            // You can control the visibility of which WMS layers are displayed by adding the
            // sub-LayerID's to the String Array. 
            string[] myVisibleFeatureLayers = { "FeatureLayerResDockPhotos2011" };
            myFeatureLayerDockPhotos2011 = myVisibleFeatureLayers;
        }
0 Kudos
1 Reply
LauraMiles1
Frequent Contributor
Nevermind, I figured it out.
0 Kudos