This object is in archive! 

My own sqlitedb files will open without errors but no tiles showing?

Dimitry L shared this question 5 years ago
Answered

I've attached a sample file with just zoom 10 and 11.

I generated a simple sqlitedb file using pythons sqlite3. It's a very simple table, initialised as you can see in "DB Browser for SQLite":

CREATE TABLE tiles (x INTEGER, y INTEGER, z INTEGER, image BYTE, PRIMARY KEY(x,y,z))

The image tiles are 256x256 .PNG images. edit: and I did ensure zoom is stored as (17 - zoom)

I can load it into locus successfully but none of the tiles are rendering. Every time I open the map however, it asks me to recenter the image. When I click yes it does recenter to the location of the map (so I think I have named all the tiles correctly). For reference the location is Berlin, germany.


I'm new to programming so I bet I am doing something obvious wrong, but I cant figure out what it is. Can anyone point me in the right direction?

Replies (3)

photo
1

Good day Dimitry,

your database looks almost perfectly ok, except small detail. Locus Map also use one additional column "s", where is stored number of hours since January 2011, when certain tile was stored. This value is used mainly for online maps, where is defined validity of map tiles.

Anyway all you need to do is add another column "s" (INTEGER) and leave it empty or set values to 0, does not matter for your own maps.

This should help. Let me know if there will still be any problem.

Menion

photo
1

Hi Menion, thanks for looking at my problem.

I tried adding the s field and initialized to zero. Unfortunately it still doesn't render the tiles.

In the mean time I also tried saving as MBTiles format instead, and I got it to work this way. Still no idea why it doesnt work with .sqlitedb format. Oh well, at least my map is working now.

Thanks again

photo
1

Hello,

ah, maybe there is one more problem. Probably best is to download few map tiles of target are over some online map and check database generated by Locus Map.

Anyway if MBT works = perfect.

Menion

Replies have been locked on this page!