// ========================================================================= // Constructor // ========================================================================= private WfsLayer(CycloMediaGroupLayer layer) : base(layer) { _web = Web.Instance; _imageToAdd = new Dictionary <string, Image>(); _getImageLock = new object(); _getImageThread = null; _refreshDataThread = null; _addedImage = false; _minimumScale = 0.0; _mappedFeature = null; }
private static void AvItemAdded(object item) { try { if (item != null) { var featureLayer = item as IFeatureLayer; var extension = GsExtension.GetExtension(); if ((featureLayer != null) && (extension != null)) { CycloMediaGroupLayer cycloGrouplayer = extension.CycloMediaGroupLayer; if (cycloGrouplayer != null) { if (!cycloGrouplayer.IsKnownName(featureLayer.Name)) { var dataset = item as IDataset; if (dataset != null) { var featureWorkspace = dataset.Workspace as IFeatureWorkspace; if (featureWorkspace != null) { var featureClass = featureLayer.FeatureClass; var vectorLayer = new VectorLayer { _featureClass = featureClass, _layer = featureLayer, IsVisibleInGlobespotter = StoredLayers.Instance.Get(featureLayer.Name) }; _layers.Add(vectorLayer); if (LayerAddEvent != null) { LayerAddEvent(vectorLayer); } } } } } } } } catch (Exception ex) { Trace.WriteLine(ex.Message, "VectorLayer.AvItemAdded"); } }
// ========================================================================= // Constructor // ========================================================================= protected CycloMediaLayer(CycloMediaGroupLayer layer) { _getDataLock = new object(); _addData = null; _getDataThread = null; _cycloMediaGroupLayer = layer; _isVisibleInGlobespotter = true; IActiveView activeView = ArcUtils.ActiveView; Visible = false; IsRemoved = true; if (activeView != null) { _lastextent = activeView.Extent; } }
// ========================================================================= // Functions (Static) // ========================================================================= public static IList <WfsLayer> GetCapabilities(string url, string version) { if (url.Substring(url.Length - 1) == "?") { url = url.Substring(0, url.Length - 1); } Web web = Web.Instance; List <XElement> elements = web.GetCapabilities(url, version); GsExtension extension = GsExtension.GetExtension(); CycloMediaGroupLayer cycloMediaGroupLayer = (extension == null) ? null : extension.CycloMediaGroupLayer; return((from element in elements from featureType in element.Descendants(FeatureType.TypeName) where featureType != null select new WfsLayer(cycloMediaGroupLayer) { Url = url, Version = version, FeatureType = new FeatureType(featureType) }).ToList()); }
public RecordingLayer(CycloMediaGroupLayer layer) : base(layer) { // empty }
public HistoricalLayer(CycloMediaGroupLayer layer) : base(layer) { // empty }