MBtiles map centering not working

Michael Bechtold shared this problem 39 days ago
Not a Problem

Whatever value is stored in MBtiles metadata -> center, Locus always centers at 0/0

I think it did work correctly in some earlier releases, but I do not recall the version/year.

Can you pls. check and advise?

TXs and cheers

Michael

Replies (8)

photo
1

Hi Michael,

could you please share any MBT file that causes this problem? I've tested it with a random MBT and I didn't get any error...

photo
1

Hi Michal,

it does not throw an error, but rather does not relocate to the center specified in the metadata.

You can take any OAM-World MBT to try.

TXs and cheers

Michael

photo
1

When I test it with OAM World 1-8, the map is centered correctly:

44c1cc9bb6f2a612f057fc3ed94ad03a

What else should I test? Did I omit anything?

photo
1

Hi Michal,

I just downloaded that map to check, and I find the center at 0.0,-135.0,5 in the MBtiles metadata. Hence your screenshot proves the error.

BTW: the reason why I set the center to Antarctica is, that Locus floods the Quick map switch list with various regional and the world map, if they have the center at 0, 0. This is why I move then away - I thought ...

TXs and cheers

Michael

photo
1

Hello Michael,

please check the docs: "longitude" value should be the first, not the second: https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md#metadata

photo
1

Shame on me - your advice works like a charm, Menion. TXs so much!

photo
1

OAM World Maps (full globe) corrected and uploaded to staging - should be on website tomorrow (Sat) morning.

Leave a Comment
 
Attach a file