Closed GoogleCodeExporter closed 9 years ago
Are you *sure* you have offline tiles at zoom level 14? Can you check your
database?
Original comment by kurtzm...@gmail.com
on 29 May 2013 at 12:50
Same here. I got a database with levels 14, 15, 16 and 17. 14 and 15 are shown
without a problem, but 16 and 17 will stretch from the other levels. Or if you
start on level 17 everything will be blank until you zoom out to level 15.
Google Nexus 7, Android 4.2.2 and HTC Desire, Android 2.2.2, both wrong with
3.0.10.
Linking my app to OsmDroid 3.0.8 solves the problem.
Original comment by zoefz...@gmail.com
on 20 Jun 2013 at 6:25
Thank you for the additional information. Can you debug
DatabaseFileArchive.getInputStream() and see what happens when you are looking
at zoom level 16 or 17. Does the method get hit? If so, why doesn't it return a
tile? Does it get hit at zoom level 14 and 15?
Also if you have a small database that exhibits the issue, please attach it to
this ticket.
Original comment by kurtzm...@gmail.com
on 20 Jun 2013 at 11:23
This is the database. As you can see the tiles are located around N 51.4788 E
3.6158
Can I debug the code when I'm just linking to the jar-file? I'll try.
Original comment by zoefz...@gmail.com
on 21 Jun 2013 at 10:23
Attachments:
I debugged DatabaseFileArchive.getInputStream() with 3.0.10 and it is NOT hit
on levels 16 and 17. And of course it is hit on levels 14 and 15. All 4 levels
are hit with version 3.0.8
Original comment by zoefz...@gmail.com
on 27 Jun 2013 at 12:01
FYI: my implementation of IArchiveFile
Original comment by zoefz...@gmail.com
on 27 Jun 2013 at 12:04
Attachments:
Your problem is now clear to me:
XYTileSource tSource;
tSource = new XYTileSource("mbtiles",
ResourceProxy.string.offline_mode,
8, 15, 256, ".png", "http://who.cares/");
You are saying that this tile source only contains tiles from zoom levels 8-15.
Change the parameters to allow for the full range of zoom levels. We changed
the array provider to not ask for tiles that the tile provider can't provide.
Original comment by kurtzm...@gmail.com
on 27 Jun 2013 at 1:25
I'm afraid you're mixing up two different problems. The topic starter has a
database with level 8-15 with 14 and 15 not showing. So he is correct in
limiting the zoom levels from 8 to 15.
I have a database with levels 14-17 with 16 and 17 not showing. But I'm not
using XYTileSource, but just implementing IArchiveFile, where/how should I
indicate the needed levels?
Original comment by zoefz...@gmail.com
on 27 Jun 2013 at 1:41
Ah, yes. What TileSource are you passing to MapTileFileArchiveProvider()?
Original comment by kurtzm...@gmail.com
on 27 Jun 2013 at 1:45
I'm using:
SimpleRegisterReceiver simpleReceiver = new SimpleRegisterReceiver(this);
mResourceProxy = new DefaultResourceProxyImpl(getApplicationContext());
File sqliteDatabaseFile = new File(kaartNaam);
LocusTiles locusTilesFileArchive =
LocusTiles.getDatabaseFileArchive(sqliteDatabaseFile);
IArchiveFile[] files = { locusTilesFileArchive };
MapTileModuleProviderBase moduleProvider = new
MapTileFileArchiveProvider(simpleReceiver, locusTileSource, files);
mProvider = new MapTileProviderArray(locusTileSource, null, new
MapTileModuleProviderBase[]{ moduleProvider } );
mapView = new ZoomLimitOsmDroidMapView(this, 256, mResourceProxy, mProvider);
mapView.setMinZoomLevel(locusTilesFileArchive.getMinZoom());
mapView.setMaxZoomLevel(locusTilesFileArchive.getMaxZoom());
where "locusTilesFileArchive.getMinZoom()" gives 14 and
"locusTilesFileArchive.getMaxZoom()" gives 17
Can it be a problem that I'm setting the min and max zoomlevels to the mapView,
and not somehow to the tile provider? And if so, how do i correct that?
Original comment by zoefz...@gmail.com
on 27 Jun 2013 at 2:18
Can you show me how locusTileSource gets created? That is the TileSource I am
interested in.
Original comment by kurtzm...@gmail.com
on 27 Jun 2013 at 2:33
Arghhh! You're spot on!
Private XYTileSource locusTileSource = new XYTileSource(
"locus", ResourceProxy.string.offline_mode, 6, 15, 256, ".png",
"http://i.dont.care.org/");
So the same as the topic starter ;-)
How did I miss that :-(
I will fix this and get back to you if it fixed my problem...
Original comment by zoefz...@gmail.com
on 27 Jun 2013 at 2:39
Yep, problem fixed!
Thank you so much for your support!
Original comment by zoefz...@gmail.com
on 27 Jun 2013 at 2:41
Good to know! I'd still like to know why locusTilesFileArchive.getMaxZoom()
returned 17 if the tile source was at max 15...
Original comment by kurtzm...@gmail.com
on 27 Jun 2013 at 3:02
Because I read that value myself directly from the file...
I should have used moduleProvider.getMinimumZoomLevel() I suppose?!
Original comment by zoefz...@gmail.com
on 27 Jun 2013 at 3:10
Ah - yes, you are correct.
If the original poster (avmalyutin) would like to speak up to let us know if
this also solves their problem then I can close this ticket. Otherwise I will
close it after a few days.
Original comment by kurtzm...@gmail.com
on 27 Jun 2013 at 3:23
Original comment by kurtzm...@gmail.com
on 10 Jul 2013 at 8:54
Original issue reported on code.google.com by
avmalyu...@gmail.com
on 29 May 2013 at 10:54Attachments: