Add a X margin (pixels)

Started by YvanCB, September 19, 2021, 02:45:17 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

YvanCB

Hello,
I'm a little bit confused with the option "Add a X margin (pixels)" or "Add a Y margin (pixels)".



It's supposed to be useful for overlapped maps.
Is there somebody to explain to me this option?
Regards.

YvanCB

Nobody to try to explain to me this function 😥?

lacdan

This is the distance (number of pixels) from the edges of the map you are using at which you are proposed to choose an other map available. Try different values to see what happens when you approach the limit of the map.

LaurentG

Like @YvanCB I have never understood what this parameter was for, so I was very interested that someone asks, and even more that someone else answers, but clearly, your explanation @lacdan is wrong (at least in rev 7.4.23)
Since I was hoping your asumption is true, I did the test... and with value set to 0 or to 999 (the maximum value available), or any intermediate value, the behaviour is strictly the same when cursor arrives at the edge of current map.

Would be also REALLY interested in an (exact) explanation of this option...

lacdan

I have checked with 8.5.2 Gp and it is correct.

LaurentG

I really do not understand you.
I just do the test, with 8.5.2, and whatever the values of these options, OM propose to choose a new map (or automatically switch to the new map, if there is only one available) exactly when the cursor is at the limit of the map. Never before.
And exactly at the same point whatever the value of the options.

So this mean I do not have understood your explanation. We surely not speak about the same thing.
Could you please to be a little bit more specific.
Thanks !

lacdan

I' ve checked again and the shift to a new map (or the choice between several maps) occurs when the cursor is at the distance selected from the limit.

LaurentG

#7
OK, I believe you, even if it is not what I can see.
Maybe the behaviour is not the same depending on external parameters, like Android version, or something else.

It would be interesting if some other users may give their own experience.
And also if Jose Vasquez could tell us what should be the behaviour "as designed"

PS : Among "external parameters", it could be due to map type/format.
Which type are the maps in your test ? In my case, they are in MBTiles Sqlite format.

Juanjo

Hi,

same as LaurentG here, I can reproduce it on 2 different devices:

Android 11 / oruxmaps  8.5.2 GP
Android 10 / oruxmaps 7.4.24 / 8.5.2 GP/ 8.5.2 beta6 (latest beta)

On both I am asked for a new map only when I reach the edge of the current one, no matter the value of the margins setting. I tried 256, 512 and 768 which corresponds to 1, 2 and 3 tiles of the map I used for the test. Map format is MBTiles as well

lacdan


LaurentG

I understand you less and less.... :-[

WMS are Online maps, that DO NOT HAVE really "limit" (even if server may provide data in some areas, and nothing elsewhere).
And then, with these maps, from OM standpoint, you are never at the limit, nor close to the limit , and OM never ask you to switch to another map....

It's ONLY with local offline maps that this feature to switch from one map to another makes sense....

What do you mean when you write "I made the test with WMS maps." ????

YvanCB

Hello,
As I can see,  this feature isn't so easy to understand.
I'm not alone to ask me some questions...
Some body will probably find the "solution ".
Regards.

LaurentG

I was wondering if this option wasn't meaningful only for MAP CREATION.
Then I did a test, create twice the "same map" (same top-left and bottom-right corner, same online map as source, same levels required), but once with XMargin and YMargin set to 0, the second with these options set to 900.
I was expecting that the area requested could be "enlarged"  of the value of options.

Actually, it is not the case : both maps are exactly the same.

BUT... the maps created by OM are created as OTRK format (supposed to be the "native" OruxMaps format).
And I have discovered that, WHEN MAPS ARE AT THE OTRK format, behaviour is as @lacdan describe, which is NOT THE CASE when maps are at MBtiles format.

In conclusion : Lacdan's answer is RIGHT.... but ONLY with OTRK maps, not with MBTiles maps (which explain results of my own tests and Juanjo's tests).

orux

Quote from: lacdan on September 26, 2021, 05:37:50 PM
This is the distance (number of pixels) from the edges of the map you are using at which you are proposed to choose an other map available. Try different values to see what happens when you approach the limit of the map.
This is the correct answer.

But with some maps (mbtiles specially) can be problems with map limits. Then the app does not aplies the limits.

You remember me that I have to work with this stuff ;)


Some online maps can also have limits.


orux