OruxMaps

Uncategorized Boards => GENERAL => Topic started by: YvanCB on September 19, 2021, 02:45:17 PM

Title: Add a X margin (pixels)
Post by: YvanCB on September 19, 2021, 02:45:17 PM
Hello,
I'm a little bit confused with the option "Add a X margin (pixels)" or "Add a Y margin (pixels)".

(https://mini.ouplo.com/15/25/qXR9.jpg) (https://full.ouplo.com/15/25/qXR9.jpg)

It's supposed to be useful for overlapped maps.
Is there somebody to explain to me this option?
Regards.
Title: Re: Add a X margin (pixels)
Post by: YvanCB on September 24, 2021, 05:12:03 PM
Nobody to try to explain to me this function 😥?
Title: Re: Add a X margin (pixels)
Post by: 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.
Title: Re: Add a X margin (pixels)
Post by: LaurentG on September 26, 2021, 08:24:21 PM
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...
Title: Re: Add a X margin (pixels)
Post by: lacdan on September 27, 2021, 12:47:02 PM
I have checked with 8.5.2 Gp and it is correct.
Title: Re: Add a X margin (pixels)
Post by: LaurentG on September 28, 2021, 09:25:04 PM
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 !
Title: Re: Add a X margin (pixels)
Post by: lacdan on September 29, 2021, 02:21:51 PM
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.
Title: Re: Add a X margin (pixels)
Post by: LaurentG on September 29, 2021, 06:04:43 PM
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.
Title: Re: Add a X margin (pixels)
Post by: Juanjo on September 29, 2021, 07:12:38 PM
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
Title: Re: Add a X margin (pixels)
Post by: lacdan on September 30, 2021, 10:32:58 AM
I made the test with WMS maps.
Title: Re: Add a X margin (pixels)
Post by: LaurentG on September 30, 2021, 06:47:01 PM
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." ????
Title: Re: Add a X margin (pixels)
Post by: YvanCB on September 30, 2021, 09:46:57 PM
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.
Title: Re: Add a X margin (pixels)
Post by: LaurentG on October 01, 2021, 09:25:55 AM
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).
Title: Re: Add a X margin (pixels)
Post by: orux on October 03, 2021, 09:12:39 PM
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