Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - 2012

#1
No problem.
Where I'm scratching my head is: the painful restrictions by Google for the file system access do exist since Android 11. Hence, if you came from Android 11+ and it worked before until recently (upgrade to 14): what was special about your Android 14 upgrade? HHas the device been wiped on the way to Android 14?
If not wiped, then you can try x-plore or Total Commander to get access to the private data structures where your data should be residing still. But then, on the other hand, also Locus should work seamlessly as the structure would not have changed.
I.e. still some digging to find essential facts ...
The following users thanked this post: 2012
#2
Search tool:
From what I see the same problem that I found in the webplanner is also present in the Locus app.
All searches are performed on the basis of the name key, but a lot of information is present in the other keys and therefore these places are not found.
In OSM many nodes do not have the name tag, but have the amenity key valued therefore Locus does not identify these values.
An example above all, of relevant importance for those who are outdoors is the search for a source of water. This public drinking fountain has no name, but is tagged as amenity = drinking_water
<osm version = "0.6" generator = "CGImap 0.8.3 (1793695 spike-08.openstreetmap.org)" copyright = "OpenStreetMap and contributors" attribution = "http://www.openstreetmap.org/copyright" license = " http://opendatacommons.org/licenses/odbl/1-0/ ">
<node id = "6312687085" visible = "true" version = "1" changeset = "67715997" timestamp = "2019-03-02T15: 22: 00Z" user = "Cascafico" uid = "361003" lat = "45.9451386" lon = "13.6199964">
<tag k = "access" v = "yes" />
<tag k = "amenity" v = "drinking_water" />
<tag k = "drinking_water" v = "yes" />
<tag k = "indoor" v = "no" />
</node>
</osm>
The following users thanked this post: 2012
#3
Hello,
Please find below a solution for Mobac

// Nom de la carte affiché dans MOBAC
name = "France, cartes papiers Michelin (Rev.081)-Z(10,11,12)-2019";

// Nom du serveur
String MyServer = ".viamichelin.com";
String MyServer_2 = "map.viamichelin.com";

// Key au format "/blabla"
String MyKey = "";

// MyUserAgent correspond à celui créé notemment avec la clé IGN
// Par défaut, on trouve souvent MyUserAgent = "Mozilla/5.0 Gecko/20100101 Firefox/49.0";
String MyUserAgent = "Mozilla/5.0 Gecko/20100101 Firefox/49.0";

// MyReferer peut être demandé
String MyReferer = "";

// MyFolder au format "/blabla"
String MyFolder = "/mapsgene/dm/mapdirect";
String MyFolder_2 = "/map/mapsgene/dm/mapdirect";

tileType = "png"; // Type d'image fourni par le serveur (png, jpg or gif)
tileSize = 256; // Facultatif : Supprimer la ligne dans le doute
minZoom = 2; // Facultatif : Zoom minimal souhaité (et/ou fourni par le serveur)
maxZoom = 19; // Facultatif : Zoom maximal souhaité (et/ou fourni par le serveur) -> Maximum 22 pour Mobac

// Gestion des passages de zooms pour recentrer la carte
Zoom10=0;
Zoom11=0;
Zoom12=0;
CorrectionX=0;
CorrectionY=0;

String getTileUrl(int Zoom, int X, int Y) {
// Autres paramètres spécifiques GetTile
// TileMatrix = Zoom : Le nom de la matrice qui contient la tuile
// TileCol = X : Le numéro de colonne du coin supérieur gauche de la tuile
// TileRow = Y : Le numéro de ligne du coin supérieur gauche de la tuile
if (Zoom < 7) {
Zoom10=0;
Zoom11=0;
Zoom12=0;
// gestion Zoom < 7, on prend une carte générique Google pour voir le monde entier
return "http://mt0.google.com/vt/lyrs=m@176103410&hl=fr&s=Galileo&scale=1&z=" + Zoom + "&x=" + X + "&y=" + Y;
}else if (Zoom < 10){
Zoom10=0;
Zoom11=0;
Zoom12=0;
// url = ""
return "https://" + MyServer_2 + MyFolder_2 + ";" + urlstring(Zoom,X+1,Y+1);
}else if (Zoom < 11){
Num_Server = (X % 3) + 10; // 10 11 12
Zoom11=0;
Zoom12=0;
if (Zoom10==0) {
// X(A,B)->X, A1,A2,B1,B2
// Brest <-> Strasbourg
CorrectionX = EchelleXY(X,499,16,534,37);
// Dunkerque <-> Perpignan
CorrectionY = EchelleXY(Y,343,34,377,55);
Zoom10=1;
}
return "http://m" + Num_Server + MyServer + MyFolder + ";" + urlstring(Zoom,X-CorrectionX,Y-CorrectionY);
}else if (Zoom < 12){
Num_Server = (X % 3) + 10; // 10 11 12
Zoom10=0;
Zoom12=0;
// pour geneve correction X-993,Y-687
if (Zoom11==0) {
// X(A,B)->X, A1,A2,B1,B2
// Brest <-> Strasbourg
CorrectionX = EchelleXY(X,998,14,1067,73);
// Dunkerque <-> Perpignan
CorrectionY = EchelleXY(Y,685,5,754,65);
Zoom11=1;
}
return "http://m" + Num_Server + MyServer + MyFolder + ";" + urlstring(Zoom,X-CorrectionX,Y-CorrectionY);
}else if (Zoom < 13){
Num_Server = (X % 3) + 10; // 10 11 12
Zoom10=0;
Zoom11=0;
// pour geneve correction X-2017,Y-1386
if (Zoom12==0) {
// X(A,B)->X, A1,A2,B1,B2
// Brest <-> Strasbourg
CorrectionX = EchelleXY(X,1996,11,2136,112);
// Dunkerque <-> Perpignan
CorrectionY = EchelleXY(Y,1370,8,1509,112);
Zoom12=1;
}
return "http://m" + Num_Server + MyServer + MyFolder + ";" + urlstring(Zoom,X-CorrectionX,Y-CorrectionY);
}else{
// url = ""
return "https://" + MyServer_2 + MyFolder_2 + ";" + urlstring(Zoom,X+1,Y+1);
}
}

void addHeaders(java.net.HttpURLConnection conn) {
conn.addRequestProperty("Referer",MyReferer);
conn.addRequestProperty("User-Agent",MyUserAgent);
}

//
// Fonction EchelleXY
//
static import java.lang.Math.*;
int EchelleXY(int XY,int a1,int a2,int b1,int b2){
// *0.00001/100000 -> pour convertir avec 5 chiffres significatifs, sinon 0.0
float A = ((b2 - a2)*0.00001/(b1-a1))*100000;
float B = a2 - A * a1;
int corXY = round(A * XY + B);
// javax.swing.JOptionPane.showMessageDialog(null,"XY" +XY+ "#" + (XY-corXY));
return (XY-corXY);
}

//
// Fonction projecion de ViaMichelin
//

import java.util.Base64;

String urlstring(int zm,int My_col,int My_row) {
int[] tile;
int new_zoom=zm;
String zs;
switch (new_zoom) {
case 1   : zs="viamichelin.background@z1" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6MQ==
case 2   : zs="viamichelin.background@z2" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6Mg==
case 3   : zs="viamichelin.background@z3" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6Mw==
case 4   : zs="viamichelin.background@z4" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6NA==
case 5   : zs="viamichelin.background@z5" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6NQ==
case 6   : zs="viamichelin.background@z6" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6Ng==
case 7   : zs="viamichelin.background@z7" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6Nw==
case 8   : zs="viamichelin.background@z8" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6OA==
case 9   : zs="viamichelin.background@z9" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6OQ==
case 10  : zs="eur_c_1000k_r05" ; break; //ZXVyX2NfMTAwMGtfcjA1
case 11  : zs="fra_c_0275k_r81" ; break; //ZnJhX2NfMDI3NWtfcjgx
case 12  : zs="fra_c_0185k_r81" ; break; //ZnJhX2NfMDE4NWtfcjgx
case 13  : zs="viamichelin.background@z13" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6MTM=
case 14  : zs="viamichelin.background@z14" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6MTQ=
case 15  : zs="viamichelin.background@z15" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6MTU=
case 16  : zs="viamichelin.background@z16" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6MTY=
case 17  : zs="viamichelin.background@z17" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6MTc=
case 18  : zs="viamichelin.background@z18" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6MTg=
case 19  : zs="viamichelin.background@z19" ; break; //dmlhbWljaGVsaW4uYmFja2dyb3VuZEB6MTk=
}
tile = cr2tile(My_col,My_row);
int tileA = tile[0];
int tileB = tile[1];
switch (new_zoom) {
case 10:

String tilestring = tiles2string(String.valueOf(tileA),String.valueOf(tileB));
//javax.swing.JOptionPane.showMessageDialog(null,tilestring);
break;
case 11:
String tilestring = tiles2string(String.valueOf(tileA),String.valueOf(tileB));
break;
case 12:
String tilestring = tiles2string(String.valueOf(tileA),String.valueOf(tileB));
break;
default:
String tilestring = tiles2string(String.valueOf(tileA),String.valueOf(tileB));
break;
}

// Encode Base64
String mapb64string  = Base64.getEncoder().encodeToString(zs.getBytes("utf-8"));
String tileb64string = Base64.getEncoder().encodeToString(tilestring.getBytes("utf-8"));

return mapb64string + ";"+ tileb64string;
}

int[] cr2tile(int My_col,int My_row) {
// original cell:
// A:B
// child cells:
// 2B:2A    2B+1:2A
// 2B:2A+1 2B+1:2A+1

int[] tile2 = new int[2];
int A;
int B;

if ((My_col==1)&&(My_row==1)) {
A = 0;
B = 0;
}
else {
// transformation en decimal -> (double)
Double col0=(Double)My_col;
Double row0=(Double)My_row;
int col2 = round(col0/2);
int row2 = round(row0/2);
tile2 = cr2tile(col2,row2);
int tile2A = tile2[0];
int tile2B = tile2[1];
A = tile2B * 2 + ((My_col-1) % 2);
B = tile2A * 2 + ((My_row-1) % 2);
// note that the A/B switch above is intentional
}
return new int[] {A,B};
}

String tiles2string(String a,String b) {
String ps="";
String qs="";
int p=a.length();
int q=b.length();
for(i=0;i<(10-p);p++)
ps=ps+"0";
for(i=0;i<(10-q);q++)
qs=qs+"0";
return ps + a + qs + b;
}


//
// FIN ViaMichelin
//


Note :
the cards are not centered (France Z10 in Norway).
I use two affine functions based on four cities.
Brest <-> Strasbourg for the horizontal and
Dunkerque <-> Perpignan for the vertical
Nicolas
The following users thanked this post: 2012
#5
Hi,
your issue is very likely caused by wrong settings of map provider. The issue is well described at https://help.locusmap.eu/topic/strava-heatmap-requires-now-authentification-at-higher-zoom#comment-70872
The following users thanked this post: 2012
#6
Hi,
I made some bigger changes in the core of Locus Map application during last months and most probably after two or three months, we would like to publish a bigger update where this limitation should be removed. So later will be possible to combine all possible maps together without limit. Give us some time, but I'm sure it will work ;).
The following users thanked this post: 2012
#7
Good day,
unfortunately, due to the security of paid content, an ID of private maps remains private in app. Even if known, using them for the background of custom maps is still not possible, app refuses it. Thanks for understanding.
The following users thanked this post: 2012
#8
Hi.
They changed their tiling scheme some time ago, so you can easily integrate it into Locus.
Just create a new xml file (e. g.  michelin.xml) in the \Locus\mapsOnline\custom\ folder with the following content:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- ViaMichelin maps -->
<providers>
<provider id="80118" type="0" visible="true" background="-1">
      <name>ViaMichelin</name>
      <mode>Michelin</mode>
      <countries>Europe</countries>
      <url><![CDATA[http://map{s}.viamichelin.com/map/mapdirect?map=viamichelin&z={z}&x={x}&y={y}&format=png&version=201503191157&layer=background&locale=default&debug_pattern=.*]]></url>
      <serverPart>1;2;3</serverPart>
      <zoomPart>{z}-8</zoomPart>
      <zoomMin>16</zoomMin>
      <zoomMax>28</zoomMax>
      <tileSize>256</tileSize>
      <attribution><![CDATA[Map data ©Michelin TomTom Natural Earth<a href="http://www.viamichelin.de/">© viamichelin.de</a>]]></attribution>
      <extraHeader><![CDATA[Referer#http://www.viamichelin.de/]]></extraHeader>
      <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/21]]></extraHeader>
   </provider>
</providers>
The following users thanked this post: 2012