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();
}
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(); }