Quick map switch list not respecting map centers

Michael Bechtold shared this problem 36 days ago
In Progress

Follow on to https://help.locusmap.eu/topic/36668-mbtiles-map-centering-not-working#

After Menion's hint I found that only the full world maps had the coordinate flip error on my part - and I have only the ZL11 one installed. Then I found that all region maps work nicely re. map centering.

But still, all of them populate the Quick map switch list, regardless of where my current view is.

That IS a problem, right?

Replies (9)

photo
1

Hello Michael,

quick map switch should not include world maps.

What is the world map?
In the app definition, it is a map that

- name ends with the word "world"

- or it's coverage is half of the world or more AND the max zoom level is 10 or less

Maybe the zoom level is the problem? I may increase this limit to 12 if this helps.

photo
1

Now I understand why, Menion, TXs.

The maps in question are regional maps which have map centers well apart. Hence a Asia and North America regional map should never be in the list together, but they are.

And all the dozens of vector maps in between are NOT in the list.

I fear there is something else happening...

Can you pls. advise?

TXs and cheers

Michael

photo
1

This is a little more complicated to describe.

Most easy (maybe) to tell me some OAM maps that are not listed in certain moments (defined by the screen center and zoom level) and I'll try it on my own device?

photo
1

While I'm curious to understand the logic, here is the naming pattern that overcrowds this list:

OAM-W1- is the prefix, mbtiles the suffix.

From logic in most places on the planet, only one map (nearest) should be visible.

photo
1

It does not helped, sorry :)

I simply do not see the world maps in the quick map switch offer...

f9a5f1f4c817a9da15bc59e78604be20170cd5d1b2c819af9a5d161e10ea6624

photo
1

How does Locus react to map center and its third value - zoom level? I could adapt here easily.

photo
1

Hmm, what are these maps covering? Based on extra texts, like "SW9-12", "NA9-13", it looks like they are world maps + some more local coverage in higher zoom levels right?

Because of this, maps are no longer considered as "global world" maps, but more local and should be offered in the quick map switch dialog.

photo
1

You are reading the names correctly, Menion. I agree they should not be filtered out per se.

There should or could be 1, max 2 in that list, but not all of them, because there are many vector maps (LoMaps plus OAM) around.

So, why are there all regional raster maps, but all the near vector maps missing?

photo
1

Understand. I'll try to describe the algorithm I made a long time ago...

1. basic conditions, in this case only exclusion of the world maps

2. then sort by distance from the currently visible bbox. In the case, there is an intersection with the bbox, distance is set to "0"

3. maps with sorted distance "0" should be then sorted by the "last used" time

4. and in rare cases when maps were not yet used, they are sorted by it's own area coverage

So in your case, they are most probably sorted first because you were using and testing them a moment ago compared to the other vector maps, is it possible?

photo
photo
1

TXs, Menion, that may explain why.

I did not test all, and the problem stays forever anyway.

But #2 is evaluating the bbox, not the center.

These maps have a worldwide bbox in ZL 1-8, but local ZL 9+ bboxes are much smaller.

When the screen shows Canberra, but maps in the list are all over the world ...

What do you think?

photo
1

I think the current solution is good, and I see no easy way to improve it. You are creating maps with world coverage at low zoom levels and some local detail.

How to deal with such maps? As "world maps"


The easiest solution I see is using the "bounds" parameter supported by the MBTiles format (https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md). Currently, Locus Map ignores this parameter, but if we add support for it, it should correctly appear in this list as small local maps > simply based on the supplied BBOX and not the app's computation. On the second side, specs say: "Bounds must define an area covered by all zoom levels.", so with this, we won't follow the recommendation ... complicated.

photo
1

Yes, those regional maps have the whole world up to ZL 7 and 8 (two different sets of regional maps, up to ZL 11 resp. 12/13) and bbox and map center criteria would show different behavior in detail.

The brute force, yet quickest way would be to go for the PREfix "OAM-W" in your filter.

You and I could go the bounds way, too, but what would be the side effects? The MBtiles would only show the region bounds then, although the maps cover the whole world, too for lower zoom levels ...

photo
1

PS: in reality most people use a ZL 9, 10 or 11 full world map as pre-loaded global map and amend with a regional map as an overlay. And in the overlay feature you have a list of 6 most recently used overlay. I.e. the "nearest" aspect is practically irrelevant, I'd conclude (only) now.

Leave a Comment
 
Attach a file