OkMap forum
OkMap forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Forum OkMap - Italiano
 Formati mappa di altri software
 Mapy non si carica
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author  Topic Next Topic
Page: of 2

Aldo

Italy
15 Posts

Posted - 13/03/2023 :  15:16:38  Show Profile  Reply with Quote
Buongiorno Gian Paolo,
da qualche temnpo non riesco a caricare le mappe di Mapy.
Con OruxMaps funzionano, ma ho visto che il percorso è in parte diverso.
Allora ho creato una nuova riga nella lista server mappe di OkMap con lo stesso percorso di Orux, ma niente da fare.

okmap

Italy
2566 Posts

Posted - 13/03/2023 :  16:19:25  Show Profile  Visit okmap's Homepage  Reply with Quote
Mi mandi per favore il percorso di OruxMaps? Grazie
Go to Top of Page

Aldo

Italy
15 Posts

Posted - 13/03/2023 :  19:16:58  Show Profile  Reply with Quote
Questo #232; il file di OruxMaps:

<onlinemapsource uid="2502">
<name>#9313;#128996; Mapy Outdoor (MAPY)</name>
<url><![CDATA[https://mapserver.mapy.cz/turist-en/retina/{$z}-{$x}-{$y}]]></url>
<website><![CDATA[<font color="#000000">©Mapy.cz Outdoor</font>]]></website>
<servers></servers>
<minzoom>1</minzoom>
<maxzoom>19</maxzoom>
<projection>MERCATORESFERICAx512</projection>
<httpparam name="User-Agent">Mozilla/5.0 AppleWebKit/537.36 Chrome/105.0.0.0 Mobile Safari/537.36</httpparam>
<httpparam name="Referer">https://en.mapy.cz/</httpparam>
<cacheable>1</cacheable>
<downloadable>1</downloadable>
<maxtilesday>0</maxtilesday>
<maxthreads>0</maxthreads>
<xop></xop>
<yop></yop>
<zop></zop>
<qop></qop>
<sop></sop>
</onlinemapsource>

Per scrupolo ho cancellato la cache delle mappe in Orux e ricaricato Mapy e ti confermo che funziona.
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 14/03/2023 :  10:03:27  Show Profile  Visit okmap's Homepage  Reply with Quote
E' vero non funziona, nemmeno su OkMap Desktop.
Nel mio OruxMaps il server Mapy non compare.
Lo hai inserito tu o c'era gi#224;?
Ciao.
Go to Top of Page

Aldo

Italy
15 Posts

Posted - 14/03/2023 :  10:44:18  Show Profile  Reply with Quote
Si, anch'io parlo di OkMap Desktop.
Mapy l'ho inserito io in Orux, ho un file onlinemapsource personalizzato secondo le mie esigenze.
Lo uso da molto tempo, ma qualche mese fa aveva smesso di funzionare.
Ho chiesto aiuto sul gruppo Telegram "GPS OruxMaps" e ho avuto il nuovo percorso.
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 14/03/2023 :  12:34:30  Show Profile  Visit okmap's Homepage  Reply with Quote
OkMap Desktop usa OpenLayers e ho provato e non funziona.
L'ho provato anche con OkMap Mobile che usa Mapsui e non funziona nemmeno li.
Sinceramente non vorrei che nel software di oruxmap venga aggiunta una api key (in sostanza una password) nella URL.
Verificher#242;....
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 19/03/2023 :  17:08:34  Show Profile  Visit okmap's Homepage  Reply with Quote
Sono venuto a capo della questione.
Mapy ha introdotto una api key necessaria nella url per poter visualizzare le mappe (v. https://api.mapy.cz/v1/docs/maptiles/#/tiles/get_v1_maptiles__mapset___tileSize___z___x___y_).
Per ora (sta in beta test) sembra che per ottenere l'api key sia necessario pagare un certo prezzo.
Probabilmente OruxMap ha sottoscritto un abbonamento ed ha "infilato" nella url l'api key al momento della richiesta al server.
Naturalmente è una supposizione ma non vedo altre possibilità.
Nella prossima versione di OkMap ci sarà la possibilità di introdurre le api key per i server che la richiedono.
Go to Top of Page

Aldo

Italy
15 Posts

Posted - 28/03/2023 :  12:01:03  Show Profile  Reply with Quote
Credo di poter affermare con certezza (anche perché confermato da altri) che OruxMaps non aggiunge ApiKey.
Felipe Gualdron del gruppo Telegram "GPS OruxMaps" mi dice che i nuovi URL di Mapy richiedono una piccola autenticazione aggiuntiva che è impostata nei parametri del file onlinemapsources.xml di OruxMaps:

<httpparam name="User-Agent">{om}</httpparam>
<httpparam name="Referer">https://en.mapy.cz/</httpparam>

Purtropo non ha OkMap e non ha la possibilità di testare il file MapsServers.xlm.
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 28/03/2023 :  12:42:33  Show Profile  Visit okmap's Homepage  Reply with Quote
Nella prossima versione di OkMap Mobile (e in futuro anche Desktop) ci sarà la possibilità di aggiungere le api key.
La REST api di Mapy ha la possibilità di aggiungere l'api key per autenticare nel formato:
https://api.mapy.cz/v1/maptiles/basic/256/{z}/{x}/{y}?lang=en&apikey=<YourApiKey>
Lo user agent è un'altra cosa; serve a far capire al server l'applicazione, la versione ed il sistema operativo utilizzato dal client.
Comunque l'indirizzo del server che fornisce le tile è api.mapy.cz mentre en.mapy.cz è la pagina che visualizza la mappa.
Sarebbe interessante avere l'indirizzo completo utilizzato da OruxMaps per vedere se esiste una "scappatoia" all'api key.
Go to Top of Page

Aldo

Italy
15 Posts

Posted - 28/03/2023 :  15:25:17  Show Profile  Reply with Quote
L'autenticazione aggiuntiva di cui parla Felipe riguarda il Referer, non lo User Agent, cioè questa stringa:

<httpparam name="Referer">https://en.mapy.cz/</httpparam>

Ho fatto una prova eliminandola dal file onlinemapsource di OruxMaps e senza di questa la mappa non si carica.

Riguardo all'indirizzo usato da OruxMaps, provo a mandarti l'estratto del file di OruxMaps che riguarda Mapy:

<onlinemapsource uid="582">
<name>Mapy Outdoor (MAPY)</name>
<url><![CDATA[https://mapserver.mapy.cz/turist-en/retina/{$z}-{$x}-{$y}]]></url>
<website><![CDATA[<font color="#000000">©Mapy.cz Outdoor</font>]]></website>
<servers></servers>
<minzoom>1</minzoom>
<maxzoom>19</maxzoom>
<projection>MERCATORESFERICAx512</projection>
<httpparam name="User-Agent">{om}</httpparam>
<httpparam name="Referer">https://en.mapy.cz/</httpparam>
<cacheable>1</cacheable>
<downloadable>1</downloadable>
<maxtilesday>0</maxtilesday>
<maxthreads>0</maxthreads>
<xop></xop>
<yop></yop>
<zop></zop>
<qop></qop>
<sop></sop>
</onlinemapsource>


Go to Top of Page

okmap

Italy
2566 Posts

Posted - 28/03/2023 :  16:19:15  Show Profile  Visit okmap's Homepage  Reply with Quote
Se provi tu stesso vedrai un 403 forbidden:
https://mapserver.mapy.cz/turist-en/retina/12/2191/1521.png
Bisogna capire come viene sostituito il valore {om} del tag <httpparam name="User-Agent">
Come viene trattato il link descritto in <httpparam name="Referer">?
Io mi sono autenticato ma non cambia nulla.
Go to Top of Page

Aldo

Italy
15 Posts

Posted - 30/03/2023 :  21:57:10  Show Profile  Reply with Quote
Troppo difficile per me.
Confidavo nel fatto che funzionando in Orux fosse abbastanza semplice usare gli stessi parametri in OkMap.
Grazie per la pazienza.
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 31/03/2023 :  09:31:20  Show Profile  Visit okmap's Homepage  Reply with Quote
Grazie a te per le info.
Provo ad approfondire ulteriormente.
Go to Top of Page

Aldo

Italy
15 Posts

Posted - 31/03/2023 :  12:10:42  Show Profile  Reply with Quote
Ti informo anche che in MOBAC la mappa si carica con questo script BSH:

name = "Mapy.cz Outdoor";
tileType = "png";
maxZoom = 19;

String getTileUrl( int Zoom, int X, int Y ) {
return "https://mapserver.mapy.cz/turist-en/"+Zoom+"-"+X+"-"+Y;
}

void addHeaders( java.net.HttpURLConnection conn) {
conn.addRequestProperty("Referer","https://en.mapy.cz/");
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 31/03/2023 :  12:42:48  Show Profile  Visit okmap's Homepage  Reply with Quote
Grazie ora studio la faccenda
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 03/04/2023 :  16:47:12  Show Profile  Visit okmap's Homepage  Reply with Quote
La soluzione è aggiungere nelle intestazioni HTTP il "Referer" = "https://en.mapy.cz/".
Ci devo smanettare un po'.
Avete gli url delle altre mappe della serie Mapy?
So che esiste anche: Historical, Normal, Orthophoto, Winter, ...
Poi ci sono anche dei layer da poter aggiungere: Hiking lines, Bike lines, Labels, ...
Grazie.
Go to Top of Page
Page: of 2  Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
OkMap forum © 2018 OkMap Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07