Intelligent Map Chooser shows mbtiles from different areas

Matthias Keller shared this problem 2 months ago
Not a Problem

I've got lots of mbtiles maps in LocusMaps Classic, but the 'intelligent map chooser' is not intelligent at all with them. It always shows me some maps first even though they don't have a single tile in that area. The bounds in the mbtiles is set correctly.

For example I've got an mbtiles of southern spain with:

bounds: -3.140637,36.638108,-1.631390,37.522508

center: -2.38601,37.0803,11

minzoom: 0

maxzoom: 20

But even when I'm in Austria or Germany with the pointer, it's always shown - usually even as first choice above any matching LoMaps.

Might this be because it includes zoom level 0 (=the whole earth) in a tile and the bounds are completely ignored?

The selection works correctly for LoMaps.

Replies (5)

photo
1

Hi Matthias,

could you please give us more detailed information? Where exactly does the problem occur - is it in the content panel or in the map manager? Could you also please provide us with a few samples of your mbtiles files? Thanks

photo
1

Hi Michal

I've tried to track it down and it seems that locus more or less ignores the metadata (maybe) and bases the coverage on effective tiles in the mbtiles.

I've reduced two mbtiles to only some levels, see attachments:


1. minutas(0-9).mbtiles contains tiles from an old Map in southeastern Spain in zoom_level 0-9

2. minutas(6-9).mbtiles contains the same tiles but only from zoom_level 6 to 9

Both contain the identical metdata:

bounds: -3.054023,36.668235,-1.722508,37.395272

center: -2.38827,37.0318,11

plus respective minzoom 0 or 6 and maxzoom 9 (not sure if that makes a difference)

Now when I center my view on Switzerland (which is waaay outside the given bounds), it sometimes (hard to say since I have so many maps) suggests the "Minutas 0-9" in the quick map switch menu.

Also when I explictily select the "0-9" Map, it's done without further complaint (but of course shows nothing because only maybe zoom-levels 0-3 would have some imagery covering Switzerland). But when I select the "6-9" Map, it asks me whether it should center it.

I would expect the latter for both maps. So I assume that the coverage both for the quick map switch and the recentering dialogue only depends on the calculated coverage which, when including zoom levels 0 and the like, is pretty much the whole continent. The bounds from the metadata seem to be ignored but would be correct and actually the best source for the coverage.


Maybe that's also the reason why indexing a new mbtiles sometimes takes ages (yes, I've got mbtiles with a two-digit number of gigabytes) because locus analyzes every single tile to calculate the coverage?

photo
1

Hi,

thanks for the additional info. Locus Map really considers the real map tiles within the MBT file when calculating the bounding box (not the metadata) so if your file contains zoom 0 covering the whole Europe the quick map selector behaves as you describe. Changing this logic would mean quite a lot of work with a few risky consequences.

The solution is to exclude the uppermost zooms in your detailed map files and use them in a "global map" instead (more at https://docs.locusmap.app/doku.php?id=manual:user_guide:maps_settings#pre-load_global_map)

regards

Michal

photo
1

Hi Michal

Thanks for the clarification. That's quite unfortunate because that forces me to leave out all outer zoom levels even though the bounds would be added correctly to the map :-(

But at least I now have a workaround.

Can you confirm that locus maps ignores all metadata except the map name? Does it even consider the minzoom and maxzoom or center or is everything calculated from the effective tiles?

Thanks

photo
1

Hi Matthias,

Locus Map only reads the format, name and center from the file metadata. All other parameters are ignored.

regards

Michal

Leave a Comment
 
Attach a file