Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrefetchToFolder bug #117

Open
zontick opened this issue Aug 8, 2018 · 7 comments
Open

PrefetchToFolder bug #117

zontick opened this issue Aug 8, 2018 · 7 comments
Labels

Comments

@zontick
Copy link

zontick commented Aug 8, 2018

I try download tiles with new version mapwingis 4.6.9.1 and remarked what after some minets of downloading function begin save empty files. They have png header, but have empty data.
default

Then i try 4.6.9.0 and get same result.
Next version 4.5.9 where tiles save without extension. Download tiles, change extension and get empty tiles.
Back on version 4.9.3.4 and get normal tiles.

@pmeems
Copy link
Contributor

pmeems commented Aug 24, 2018

I'm a bit confused by the version numbers you're using. I'm assuming their typos.
As I understand it:

  • The current latest version v4.9.6.1 is fetching empty tiles.
  • v4.9.5 is also fetching empty tiles
  • v4.9.3.4 is getting correct files

Is this only happening with OSM data or also with other tile providers?

@pmeems
Copy link
Contributor

pmeems commented Aug 24, 2018

Can you also show the code your using so I can debug it?

@pmeems
Copy link
Contributor

pmeems commented Aug 24, 2018

I created my own unit test and can't reproduce the empty tiles:
image

Perhaps it is a flaw on the server, which is sending back a wrong image?
Or is the empty tile perhaps an error response? Can you change the extension to txt and open it in a text editor?

@zontick
Copy link
Author

zontick commented Aug 26, 2018

You right about versions, it is was my typos.
This is part of code. I try only google provider.
On level 11 get half empty tiles. From level 12 get all empty tiles.

            int iCountTile=0;
            int ilevel=0;
            Extents ext = new Extents();
             ext.SetBounds(30, 10, 0, 45, 50, 0);
            int iTileProv = (int)tkTileProvider.GoogleMaps;
             string sDir = @"G:\TileTest";
            for (ilevel = 1; ilevel <= 14; ilevel++)
            {
                iCountTile = axMap1.Tiles.PrefetchToFolder(ext, ilevel, iTileProv, sDir, ".png", null);
            }

This is empty tile
image

@pmeems
Copy link
Contributor

pmeems commented Aug 26, 2018

Could you try OSM or Bing?

Since MW5 we no longer support Google Maps because they changed their license.
It is no longer allowed to use their tiles in non-webbased applications.
Most likely that is the cause of your problems.

@zontick
Copy link
Author

zontick commented Aug 26, 2018

Bing map do not work.
I try OSM and looks like it work, but speed of downloading is unreal slow.
Then got empty tiles I use machine with OS win7 x64, now I try it on another machine with win10 x64, and get no empty tiles but crashes application. It is happens about the same time of work then must be empty tiles downloads.
Then I try OpenCycleMap end get same crash.
Then i back on version 4.9.3.4 and no empty tiles and crashes.
Can you try this code on you machine with google or OpenCycleMap?

@pmeems
Copy link
Contributor

pmeems commented Aug 27, 2018

Using GoogleHybrid I can reproduce the creation of the invalid PNG-files.
I've created https://mapwindow.atlassian.net/browse/MWGIS-126 for this and will investigate this further.

@pmeems pmeems added bug and removed help wanted labels Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants