protected void StartNewFetch(BoundingBox extent, double resolution)
        {
            isFetching = true;
            needsUpdate = false;

            if (Transformation != null && Transformation.MapSRID != -1 && SRID != -1)
                extent = Transformation.Transfrom(Transformation.MapSRID, SRID, extent);

            var fetcher = new FeatureFetcher(extent, resolution, DataSource, DataArrived, DateTime.UtcNow.Ticks);
            ThreadPool.QueueUserWorkItem(fetcher.FetchOnThread);
        }
Example #2
0
        protected void StartNewFetch(BoundingBox extent, double resolution)
        {
            IsFetching = true;
            NeedsUpdate = false;

            extent = Transform(extent);

            if (Enabled)
            {
                _fetched = true;
                Overscan = Overscan > 1 ? Overscan : 1;
                var fetcher = new FeatureFetcher(extent.Grow(extent.Width * Overscan, extent.Height * Overscan), resolution, DataSource, DataArrived);
                Task.Factory.StartNew(() => fetcher.FetchOnThread(null));
            }
        }
Example #3
0
        protected void StartNewFetch(BoundingBox extent, double resolution)
        {
            IsFetching = true;
            NeedsUpdate = false;

            var newExtent = new BoundingBox(extent);

            if (Transformation != null && !string.IsNullOrWhiteSpace(CRS)) DataSource.CRS = CRS;

            if (ProjectionHelper.NeedsTransform(Transformation, CRS, DataSource.CRS))
                if (Transformation != null && Transformation.IsProjectionSupported(CRS, DataSource.CRS) == true)
                    newExtent = Transformation.Transform(CRS, DataSource.CRS, extent);

            var fetcher = new FeatureFetcher(newExtent, resolution, DataSource, DataArrived, DateTime.Now.Ticks);
            Task.Run(() => fetcher.FetchOnThread());
        }
Example #4
0
        protected void StartNewFetch(BoundingBox extent, double resolution)
        {
            IsFetching = true;
            NeedsUpdate = false;

            extent = Transform(extent);

            var fetcher = new FeatureFetcher(extent, resolution, DataSource, DataArrived);
            Task.Factory.StartNew(() => fetcher.FetchOnThread()); //!!! Why Task.Factory iso Task.Run
        }