Ejemplo n.º 1
0
 public void DecodeAndAppend(XElement xe)
 {
     foreach (var xFeature in xe.Elements())
     {
         FeatureCache fc = new FeatureCache(xFeature);
         if (!Features.Any(x => x.ID == fc.ID))
         {
             Features.Add(fc);
             Map.AddFeature(fc.Layer, fc.Feature);
         }
     }
 }
Ejemplo n.º 2
0
        public MapCache(Map map)
        {
            Features = new List <FeatureCache>();
            Map      = map;

            int id = 1;

            foreach (VectorLayer layer in map.Layers)
            {
                foreach (var feature in layer.Features)
                {
                    FeatureCache fc = new FeatureCache();
                    fc.Feature = feature;
                    fc.Extents = new Geometry.Polygon(feature.GeoData).GetExtent();
                    fc.Layer   = layer.Name;
                    fc.ID      = id.ToString();
                    Features.Add(fc);
                    id++;
                }
            }
        }
Ejemplo n.º 3
0
        public MapCache(Map map)
        {
            this.Features = new List <FeatureCache>();
            this.Map      = map;

            var id = 1;

            foreach (VectorLayer layer in map.Layers)
            {
                foreach (var feature in layer.Features)
                {
                    var fc = new FeatureCache
                    {
                        Feature = feature,
                        Extents = new PointString(feature.GeoData).GetExtents(),
                        Layer   = layer.Name,
                        ID      = id.ToString()
                    };
                    Features.Add(fc);
                    id++;
                }
            }
        }