public FeatureInfo ParseWMSResult(string layerName, Stream result)
        {
            var featureInfos = new List<Dictionary<string, string>>();
            XDocument xdoc;

            try
            {
                xdoc = XDocument.Load(result);
            }
            catch (XmlException e)
            {
                throw new ArgumentException(e.Message);
            }
            
            var fields = (from XElement element in xdoc.Descendants()
                          where (element.Name.LocalName.Equals("FIELDS"))
                          select element);

            foreach (var field in fields)
            {
                featureInfos.Add(ExtractFeatureFromField(field));
            }

            var info = new FeatureInfo { LayerName = layerName, FeatureInfos = featureInfos };

            return info;
        }
Ejemplo n.º 2
0
        public FeatureInfo ParseWMSResult(string layername, Stream result)
        {
            _featureInfo = new FeatureInfo { LayerName = layername, FeatureInfos = new List<Dictionary<string, string>>() };
            XDocument xdoc;

            try
            {
                xdoc = XDocument.Load(result);
            }
            catch (XmlException e)
            {
                throw new ApplicationException("Bad formatted XML response", e);
            }

            ExtractFeatureInfo(xdoc.Root);

            return _featureInfo;
        }
Ejemplo n.º 3
0
 private void OnIdentifyFinished(FeatureInfo featureInfo)
 {
     var handler = IdentifyFinished;
     if (handler != null) handler(this, featureInfo);
 }
Ejemplo n.º 4
0
        private void OnIdentifyFinished(FeatureInfo featureInfo)
        {
            var handler = IdentifyFinished;

            handler?.Invoke(this, featureInfo);
        }