Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.
Trekbuddy is on Github now

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Thuderforest Landscape

 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Français
View previous topic :: View next topic  
Author Message
liondafrique



Joined: 24 Jun 2011
Posts: 3

PostPosted: Thu Dec 14, 2017 4:59 pm    Post subject: Thuderforest Landscape Reply with quote

Bonjour qui pourrait m'écrire pour Mobac2 un bsh pour thunderforest landscape, j'ai une clé api, tout ceux que j'ai pu écrire ne fonctionnent pas Sur Mobac aussi bie en xml qu'en bsh.
Merci par avance
Back to top
View user's profile Send private message
backtrack007



Joined: 06 Jan 2018
Posts: 3

PostPosted: Sat Jan 06, 2018 11:23 pm    Post subject: Reply with quote

Tiens =)
T'as juste à copier/coller ta clé Thunderforest entre les guillemets pour éviter d'avoir le message API Key Required

Code:
static import java.lang.Math.*;

name = "Thunderforest (Landscape)";
tileType = "png";
tileSize = 256;
minZoom = 1;
maxZoom = 19;
tileUpdate = TileUpdate.IfModifiedSince;
backgroundColor = "#ffffff";
ignoreError = "True";

// String Referer = "https://www.openstreetmap.org/";
String UserAgent = "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0";


String getTileUrl( int zoom, int x, int y ) {
    // String Server = "https://a.tile.thunderforest.com/landscape/";
    switch (new Random().nextInt(3)) {
    case 0 : String Server = "http://a.tile.thunderforest.com/"; break;
    case 1 : String Server = "http://b.tile.thunderforest.com/"; break;
    case 2 : String Server = "http://c.tile.thunderforest.com/"; break;
    }
    String Map = "landscape";
    String Tile = Server + "/" + Map + "/" + zoom + "/" + x + "/" + y + ".png" + "TA CLE ICI";
    // javax.swing.JOptionPane.showMessageDialog(null,Tile);
    return Tile ;
}

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

// http://b.tile.thunderforest.com/landscape/16/34032/22714.png
// http://a.tile.thunderforest.com/landscape/13/4251/2838.png
// http://c.tile.thunderforest.com/landscape/14/8507/5676.png
Back to top
View user's profile Send private message
liondafrique



Joined: 24 Jun 2011
Posts: 3

PostPosted: Sun Jan 07, 2018 8:50 am    Post subject: Thunderforest Landscape Reply with quote

Bonjour, merci et meilleurs vœux 2018

Sur mon Mobac version 2.01 ton script ne me donne que des croix noires.
J'avais en fouinant sur le site réussi à en faire un à partir d'une erreur d'un gars, celui là fonctionne chez moi, le voilà si ça peut servir à quelqu’un.

static import java.lang.Math.*;
name = "Thunderforest Landscape";
tileType = "png";
tileSize = 256;
minZoom = 1;
maxZoom = 19;
tileUpdate = TileUpdate.IfModifiedSince;
backgroundColor = "#ffffff";
ignoreError = "True";
// String Referer = "";
String UserAgent = "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0";
String getTileUrl( int zoom, int x, int y ) {
// String Server = "https://a.tile.thunderforest.com";
switch (new Random().nextInt(3)) {
case 0 : String Server = "https://a.tile.thunderforest.com"; break;
case 1 : String Server = "https://b.tile.thunderforest.com"; break;
case 2 : String Server = "https://c.tile.thunderforest.com"; break;
}
String Map = "outdoors";
String Tile = Server + "/" + Map + "/" + zoom + "/" + x + "/" + y + ".png?apikey=MA CLE XXXXXXXX";
// javax.swing.JOptionPane.showMessageDialog(null,Tile);
return Tile ;
}
void addHeaders( java.net.HttpURLConnection conn) {
// conn.addRequestProperty("Referer",Referer);
conn.addRequestProperty("User-Agent",UserAgent);
}
Back to top
View user's profile Send private message
backtrack007



Joined: 06 Jan 2018
Posts: 3

PostPosted: Sun Jan 07, 2018 5:28 pm    Post subject: Reply with quote

Merde désolé j'ai fais une erreur de frappe en supprimant ma clé
Le BSH est fonctionnel pour moi d'ailleurs j'ai fait toutes les maps Thunderforest.
Ta carte c'est une outdoors pas la landscape

Code:
static import java.lang.Math.*;

name = "Thunderforest (Landscape)";
tileType = "png";
tileSize = 256;
minZoom = 1;
maxZoom = 19;
tileUpdate = TileUpdate.IfModifiedSince;
backgroundColor = "#ffffff";
ignoreError = "True";

// String Referer = "https://www.openstreetmap.org/";
String UserAgent = "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0";


String getTileUrl( int zoom, int x, int y ) {
    // String Server = "https://a.tile.thunderforest.com/landscape/";
    switch (new Random().nextInt(3)) {
    case 0 : String Server = "https://a.tile.thunderforest.com/"; break;
    case 1 : String Server = "https://b.tile.thunderforest.com/"; break;
    case 2 : String Server = "https://c.tile.thunderforest.com/"; break;
    }
    String Map = "landscape";
    String Tile = Server + "/" + Map + "/" + zoom + "/" + x + "/" + y + ".png" + "?apikey=CLEICI";
    // javax.swing.JOptionPane.showMessageDialog(null,Tile);
    return Tile ;
}

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

// http://b.tile.thunderforest.com/landscape/16/34032/22714.png
// http://a.tile.thunderforest.com/landscape/13/4251/2838.png
// http://c.tile.thunderforest.com/landscape/14/8507/5676.png
Back to top
View user's profile Send private message
backtrack007



Joined: 06 Jan 2018
Posts: 3

PostPosted: Sun Jan 07, 2018 5:39 pm    Post subject: Reply with quote

Si quelqu'un veut toutes les cartes Thunderforest avec votre clé.
Il suffit de remplacer CLEICI dans chaque fichier bsh par votre clé Thunderforest.



Thunderforest.zip
 Description:
Toutes les Cartes Thunderforest

Download
 Filename:  Thunderforest.zip
 Filesize:  6.55 KB
 Downloaded:  31 Time(s)

Back to top
View user's profile Send private message
liondafrique



Joined: 24 Jun 2011
Posts: 3

PostPosted: Sun Jan 07, 2018 6:48 pm    Post subject: Thuderforest Landscape Reply with quote

Merci, j'ai essayé tes .bsh ils fonctionnent parfaitement.
J'en ai un pour les OSM M4Umap si ça intéresse quelqu’un je le poste.
Back to top
View user's profile Send private message
Zagator



Joined: 17 Aug 2016
Posts: 11

PostPosted: Mon Jan 07, 2019 12:55 pm    Post subject: Reply with quote

Bonjour,
J'ai essayé les fichiers qui se trouvent dans l'archive "Thunderforest.zip".
J'ai mis ma cléf API : croix rouges.
Quelqu'un pourrait me dire comment faire pour que cela fonctione?


Code:

static import java.lang.Math.*;

name = "Thunderforest (outdoors)";
tileType = "png";
tileSize = 256;
minZoom = 1;
maxZoom = 19;
tileUpdate = TileUpdate.IfModifiedSince;
backgroundColor = "#ffffff";
ignoreError = "True";

// String Referer = "http://www.viamichelin.fr/";
String UserAgent = "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0";


String getTileUrl( int zoom, int x, int y ) {
    // String Server = "https://a.tile.thunderforest.com/";
    switch (new Random().nextInt(3)) {
    case 0 : String Server = "https://a.tile.thunderforest.com"; break;
    case 1 : String Server = "https://b.tile.thunderforest.com"; break;
    case 2 : String Server = "https://c.tile.thunderforest.com"; break;
    }
    String Map = "outdoors";
    String Tile = Server + "/" + Map + "/" + zoom + "/" + x + "/" + y + ".png" + "?apikey=CLEICI";
    // javax.swing.JOptionPane.showMessageDialog(null,Tile);
    return Tile ;
}

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

// http://b.tile.thunderforest.com/outdoors/16/34032/22714.png
// http://a.tile.thunderforest.com/outdoors/13/4251/2838.png
// http://c.tile.thunderforest.com/outdoors/14/8507/5676.png


Avec le code ci dessous j'ai le fond de carte mais il y a l'inscription "API KEY REQUIRED":

Code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <customMapSource>
     <name>OpenCycleMap-Cartes</name>
   <minZoom>7</minZoom>
        <maxZoom>16</maxZoom>
     <tileType>PNG</tileType>
     <tileUpdate>None</tileUpdate>
   <ignoreErrors>true</ignoreErrors>

      <url><![CDATA[http://{$serverpart}.tile.opencyclemap.org/cycle/{$z}/{$x}/{$y}.png]]></url>
   <serverParts>a b c</serverParts>
   <backgroundColor>#000000</backgroundColor>
  </customMapSource>



Quelqu'un aurait une idée?

Merci de votre aide.
Back to top
View user's profile Send private message
Zagator



Joined: 17 Aug 2016
Posts: 11

PostPosted: Tue Jan 08, 2019 11:30 am    Post subject: Reply with quote

Bonjour,

Quelqu'un aurait une idée par rapport à mon souci de croix rouges sur les Maps Thunderforest / openstreet?

Cdlt.
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 5028

PostPosted: Wed Jan 16, 2019 11:24 am    Post subject: Reply with quote

Pas beaucoup d'idées mais :
1 chez moi ça marche avec du http sans s
2 essaye de mettre ?apikey=TACLE à la fin de l'URL dans le 2e fichier XML
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Français All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group