ESRI.ArcGIS.Client.Toolkit.DataSources.KmlLayer.Initialize C# (CSharp) Method

Initialize() public method

Initializes the resource.
public Initialize ( ) : void
return void
        public override void Initialize()
        {
            if (IsInitialized)
                return;

            if (_visibleLayerIds != null)
            {
                // VisibleLayerIds is set --> layer created from a web map --> check that the layer must stay visible
                if (!_visibleLayerIds.Contains(0)) // FolderIds 0 is the layer itself (Note : we can't test here the top folder visibility (folderid=1) since the kml document has not been parsed yet, so _hasRootContainer is not initialized yet)
                    Visible = false;
            }

            Refresh();
        }

Usage Example

示例#1
0
 public void Add()
 {
     IsRunning = true;
     kml = new KmlLayer { ID = Name, Url = Location };
     gl = AppState.ViewDef.FindOrCreateGroupLayer(Folder);
     if (gl != null) gl.ChildLayers.Add(kml);
     kml.Initialize();
 }
All Usage Examples Of ESRI.ArcGIS.Client.Toolkit.DataSources.KmlLayer::Initialize