예제 #1
0
 public override void RefreshData(FetchInfo fetchInfo)
 {
     // RefreshData needs no implementation for the MemoryLayer. Calling OnDataChanged here
     // would trigger an extra needless render iteration.
     // If a user changed the data in the provider and needs to update the graphics
     // DataHasChanged should be called.
 }
예제 #2
0
        public override IEnumerable <IFeature> GetFeatures(MRect?box, double resolution)
        {
            // Safeguard in case BoundingBox is null, most likely due to no features in layer
            if (box == null)
            {
                return(new List <IFeature>());
            }

            var biggerBox = box.Grow(
                SymbolStyle.DefaultWidth * 2 * resolution,
                SymbolStyle.DefaultHeight * 2 * resolution);
            var fetchInfo = new FetchInfo(biggerBox, resolution, CRS);

            return(DataSource?.GetFeatures(fetchInfo) ?? Array.Empty <IFeature>());
        }