Hello,
Here is a map readable in MOBAC : http://randochartreuse.free.fr/oruxmaps/mobac2.0/mapsources/France-Marine-2018.bsh
Does anyone knows how to translate it in a xml map for Oruxmaps ?
Thank you :-)
name = "France, cartes marines - Z(17)-2018";
String MyServer = "services.data.shom.fr";
// Key et folder au format "/blabla"
String Mykey = "";
String Myfolder = "/clevisu/wmts";
String Mylayer = "RASTER_MARINE_3857_WMTS";
String Mystyle = "normal";
String Mytilematrixset = "3857";
String Myservice = "WMTS";
String Myrequest = "GetTile";
String Myversion = "1.0.0";
String Myformat = "image/png";
tileType = "png";
minZoom = 2;
maxZoom = 17;
String getTileUrl(int Zoom, int X, int Y) {
if (Zoom < 6) {
return "http://" + MyServerZinf6 + MyfolderZinf6 + "/" + Zoom + "/" + X + "/"+ Y + ".png";
}else{
// prévisu ne marche pas ??? url = "http://services.data.shom.fr/clevisu/wmts?Layer=RASTER_MARINE_3857_WMTS&Style=normal&Tilematrixset=3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=13&TileCol=4066&TileRow=2925"
return "http://" + MyServer + Mykey + Myfolder + "?Layer=" + Mylayer + "&Style=" + Mystyle + "&Tilematrixset=" + Mytilematrixset + "&Service=" + Myservice + "&Request=" + Myrequest + "&Version=" + Myversion + "&Format=" + Myformat + "&TileMatrix=" + Zoom + "&TileCol=" + X + "&TileRow=" + Y;
}
}
void addHeaders(java.net.HttpURLConnection conn) {
if (Windows_ou_Linux) {
// Pour Windows et Linux
conn.addRequestProperty("Referer","http://data.shom.fr");
conn.addRequestProperty("User-Agent","Mozilla/5.0 Gecko/20100101 Firefox/49.0");
}else{
// Pour MacOS
conn.addRequestProperty("Referer","http://data.shom.fr");
conn.addRequestProperty("User-Agent",UserAgent);
}
}