public FeatureCursor(FeatureClass fc, IQueryFilter filter) : base(fc?.SpatialReference, filter?.FeatureSpatialReference) { _fc = fc; _filter = filter; _cache = _filter?.DatasetCachingContext?.GetCache <FeatureCache>(); _geoJsonFeatures = _cache?[_fc.Name]?.ToArray(); }
async public Task <bool> InitFeatureCache(DatasetCachingContext cachingContext) { var map = cachingContext?.Map; var featureCache = cachingContext?.GetCache <FeatureCache>(); if (featureCache?.Dataset == this) { return(true); } if (map != null) { FeatureCache cache = new FeatureCache(this); await cache.LoadAsync(map.Display); cachingContext.AddCache(cache); } return(true); }