private void InitializeLayers() { this.Layers = new List <MSCMapLayer>(); AGSMapService aGSMapService = (AGSMapService)this.ParentService; using (IEnumerator <object> enumerator = aGSMapService.MapLayers.Values.GetEnumerator()) { while (enumerator.MoveNext()) { AGSMapLayer aGSMapLayer = (AGSMapLayer)enumerator.Current; MSCMapLayer mSCMapLayer = new MSCMapLayer(); if (aGSMapLayer.parentLayerId == -1) { mSCMapLayer.ParentLayerID = aGSMapLayer.parentLayerId; mSCMapLayer.Name = aGSMapLayer.Name; mSCMapLayer.ID = aGSMapLayer.Id; mSCMapLayer.Visible = aGSMapLayer.IsVisible; mSCMapLayer.ParentMap = this; mSCMapLayer.Layers = new List <MSCMapLayer>(); mSCMapLayer.ChildLayerIDs = new List <int>(aGSMapLayer.ChildLayerIds); this.InitializeChildLayers(mSCMapLayer); this.Layers.Add(mSCMapLayer); } } } }
private void InitializeChildLayers(MSCMapLayer parentLyr) { AGSMapService aGSMapService = (AGSMapService)this.ParentService; if (parentLyr.ChildLayerIDs.Count == 0) { return; } using (IEnumerator <object> enumerator = aGSMapService.MapLayers.Values.GetEnumerator()) { while (enumerator.MoveNext()) { AGSMapLayer aGSMapLayer = (AGSMapLayer)enumerator.Current; if (aGSMapLayer.parentLayerId == parentLyr.ID) { MSCMapLayer mSCMapLayer = new MSCMapLayer(); mSCMapLayer.Name = aGSMapLayer.Name; mSCMapLayer.ID = aGSMapLayer.Id; mSCMapLayer.Visible = aGSMapLayer.IsVisible; mSCMapLayer.Layers = new List <MSCMapLayer>(); mSCMapLayer.ParentMap = this; mSCMapLayer.ChildLayerIDs = new List <int>(aGSMapLayer.ChildLayerIds); if (mSCMapLayer.ChildLayerIDs.Count != 0) { this.InitializeChildLayers(mSCMapLayer); } parentLyr.Layers.Add(mSCMapLayer); } } } }
public ExportedFeaturesEventArgs(string map, AGSMapLayer layer, AGSSubType subtype, RecordSet rs, RecordSet drs, int index) { this.MapName = map; this.Layer = layer; this.Subtype = subtype; this.records = rs; this.densifiedRecords = drs; this.GeometryIndex = index; this.ErrorMessage = null; this.WKT = null; }
private void UpdateChildIdentifyResults(MSCMapLayer parentLayer) { AGSMapService aGSMapService = (AGSMapService)this.ParentService; foreach (MSCMapLayer current in parentLayer.Layers) { if (current.Visible) { AGSMapLayer aGSMapLayer = aGSMapService.FindMapLayer(current.ID); if (aGSMapLayer != null) { current.IdentifyResults = aGSMapLayer.IdentifyResults; this.UpdateChildIdentifyResults(current); } } } }
protected override void SetParentLayerVisibility() { AGSMapService aGSMapService = (AGSMapService)this.ParentService; foreach (MSCMapLayer current in this.Layers) { AGSMapLayer aGSMapLayer = aGSMapService.FindMapLayer(current.ID); if (aGSMapLayer != null) { aGSMapLayer.IsVisible = current.Visible; } if (current.Layers.Count > 0) { this.SetParentSubLayerVisibility(current); } } }
private void SetParentSubLayerVisibility(MSCMapLayer parentLayer) { if (parentLayer.Layers.Count == 0) { return; } AGSMapService aGSMapService = (AGSMapService)this.ParentService; foreach (MSCMapLayer current in parentLayer.Layers) { AGSMapLayer aGSMapLayer = aGSMapService.FindMapLayer(current.ID); if (aGSMapLayer != null) { aGSMapLayer.IsVisible = current.Visible; } if (current.Layers.Count > 0) { this.SetParentSubLayerVisibility(current); } } }
public bool InitializeIdentify(Extent ext) { List <int> mapLayers = this.BuildVisibleFeatureLayerList(); AGSMapService aGSMapService = (AGSMapService)this.ParentService; if (!aGSMapService.Identify(base.ExportOptions, ext, mapLayers)) { return(false); } foreach (MSCMapLayer current in this.Layers) { if (current.Visible) { AGSMapLayer aGSMapLayer = aGSMapService.FindMapLayer(current.ID); if (aGSMapLayer != null) { current.IdentifyResults = aGSMapLayer.IdentifyResults; this.UpdateChildIdentifyResults(current); } } } return(true); }