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.

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 
Mobile Atlas Creator 1.9 latest release
Goto page Previous  1, 2, 3 ... 49, 50, 51
 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools
View previous topic :: View next topic  
Author Message
mcurto



Joined: 28 Mar 2011
Posts: 37
Location: Lisboa@Portugal

PostPosted: Fri Oct 11, 2013 7:27 pm    Post subject: Reply with quote

FYI: Google sattelite image custom source (posted above as mapsources.zip )needs to be changed, where it reads v=115 should now be v=138 or else it wont work:

http://khm0.google.com/kh/v=138

same for hybrid source of course.
Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 547
Location: France

PostPosted: Fri Oct 11, 2013 8:22 pm    Post subject: Reply with quote

Thank you for information ... very useful ! Smile
Back to top
View user's profile Send private message
Werefox



Joined: 29 Oct 2013
Posts: 5

PostPosted: Sat Nov 02, 2013 12:28 pm    Post subject: Reply with quote

mcurto wrote:
FYI: Google sattelite image custom source (posted above as mapsources.zip )needs to be changed, where it reads v=115 should now be v=138 or else it wont work:

http://khm0.google.com/kh/v=138

same for hybrid source of course.

correct

http://khms" + new Random().nextInt(4) + ".google.com/kh/v=140
Back to top
View user's profile Send private message
Werefox



Joined: 29 Oct 2013
Posts: 5

PostPosted: Sat Nov 02, 2013 7:59 pm    Post subject: Reply with quote

......
private static final String dCase = "abc";
......
return "http://" + dCase.charAt(new Random().nextInt(3)) + ".tile.openstreetmap.org/"
......
Back to top
View user's profile Send private message
TrulloF



Joined: 30 Aug 2013
Posts: 2

PostPosted: Fri Nov 08, 2013 10:34 am    Post subject: Beanshel Script Help getting Value of 2 Cookies Reply with quote

Hello.
Following you find some example mapsource bsh for MOBAC. The problem I have is, that the server is issuing 2 cookies. One for JSESSIONID and one for PHPSESSID. With the given code I only get the first cookie (JSESSIONID) successfully. I found some java code examples for storing cookies, but I don't know how to integrate this into the script. Any help would be appreciated. Also there are different approaches to get cookie values which I tried, but all of them only get the first cookie. Tahnks in advance.
Code:

name = "Geoportal DE Test";

tileType = "png"; // required; valid values: "jpg" "png" or "gif"

// Default size of each tile is 256x256 pixel
tileSize = 256; // optional
minZoom = 7;    // optional
maxZoom = 15;   // optional
//tileUpdate = TileUpdate.IfModifiedSince; // optional

//get authentication cookie

URL url = new URL("http://www.geoportal.de/DE/Geoportal/geoportal.html?lang=de");
httpConn = url.openConnection();
authHeader = httpConn.getHeaderField("Set-Cookie");
auth = authHeader.split(";")[0];

/**
 This method is called for each tile: input parameters for this script: "zoom", "x" and "y"
**/
String getTileUrl( int zoom, int x, int y ) {
   return "http://www.geoportal.de/viewer/proxy/open?url=http://arcgis.lpz.web/arcgis/rest/services/webatlasde/MapServer/WMTS/tile/1.0.0/webatlasde/default/nativeTileMatrixSet/"+zoom+"/"+x+"/"+y+".png";
}

/**
 This method is called also for each tile (implementation optional)
 It allows to set HTTP headers like "Referer" or cookies the server
 wants to see.
**/
void addHeaders( java.net.HttpURLConnection conn) {
  conn.addRequestProperty("Cookie",auth);
  conn.addRequestProperty("Referer","http://www.geoportal.de/DE/Geoportal/geoportal.html?lang=de");
  conn.addRequestProperty("User-Agent","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.16");
}
Back to top
View user's profile Send private message
Werefox



Joined: 29 Oct 2013
Posts: 5

PostPosted: Sat Nov 09, 2013 9:15 am    Post subject: Re: Beanshel Script Help getting Value of 2 Cookies Reply with quote

TrulloF wrote:
"http://www.geoportal.de/"

Incorrect tiling scheme.
Back to top
View user's profile Send private message
TrulloF



Joined: 30 Aug 2013
Posts: 2

PostPosted: Sat Nov 09, 2013 7:41 pm    Post subject: Re: Beanshel Script Help getting Value of 2 Cookies Reply with quote

Werefox wrote:
TrulloF wrote:
"http://www.geoportal.de/"

Incorrect tiling scheme.


Doesn't matter if. Would be nice to be able to download the tiles anyway. They can be corrected later. I did the same thing for Bavaria and it worked well.
Back to top
View user's profile Send private message
bartho1



Joined: 08 Aug 2012
Posts: 154

PostPosted: Fri Mar 20, 2015 7:05 pm    Post subject: Reply with quote

Hello !
I just want to know if it's possible to create a customMultiLayerMapSource with various levels of localTileSQLite.
I want to use MOBAC as a viewer for my maps in .mbtiles.
I have created a map for each level of zoom. It's all ok in Oruxmaps.
For various reasons, I don't want to create directly a multilevel .mbtiles.

If I want to see the maps on the pc, I use MOBAC.
Example, for one level I have tried this with succes :

<?xml version="1.0" encoding="UTF-8"?>
<localTileSQLite>
<name>Custom SQLite atlas2</name>
<sourceFile>C:\MBTiles\NE\16-NE.mbtiles</sourceFile>
<atlasType>MBTiles</atlasType>
<backgroundColor>#000000</backgroundColor>
</localTileSQLite>

If I try this, nothing happens with the zoom :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customMultiLayerMapSource>
<name>MBTiles-Zoom</name>
<layers>
<localTileSQLite>
<name>Custom SQLite atlas</name>
<sourceFile>C:\MBTiles\NE\14-NE.mbtiles</sourceFile>
<atlasType>MBTiles</atlasType>
<backgroundColor>#000000</backgroundColor>
</localTileSQLite>
<localTileSQLite>
<name>Custom SQLite atlas1</name>
<sourceFile>C:\MBTiles\NE\15-NE.mbtiles</sourceFile>
<atlasType>MBTiles</atlasType>
<backgroundColor>#000000</backgroundColor>
</localTileSQLite>
<localTileSQLite>
<name>Custom SQLite atlas2</name>
<sourceFile>C:\MBTiles\NE\16-NE.mbtiles</sourceFile>
<atlasType>MBTiles</atlasType>
<backgroundColor>#000000</backgroundColor>
</localTileSQLite>
</layers>
</customMultiLayerMapSource>

I can see the various levels but I must before change the map to change the level (for that, I use mapquest).
Do you know where is the problem ?
Thanks
Back to top
View user's profile Send private message
mobrob



Joined: 04 Apr 2008
Posts: 372
Location: Germany

PostPosted: Fri Mar 20, 2015 7:24 pm    Post subject: Reply with quote

The best place to ask this question is the MOBAC forum: http://mobac.sourceforge.net/forum/
_________________
Mobile Atlas Creator: http://mobac.sf.net
Back to top
View user's profile Send private message Visit poster's website
hag9600gt



Joined: 30 Apr 2015
Posts: 1

PostPosted: Thu Apr 30, 2015 5:11 pm    Post subject: Reply with quote

Hello all,

I got huge tar map files, 10-20GB each. I have the tar files only.
I need to decrease the tar file sizes.
If I open the tar, a lot of jpegs are inside. I thought I extract the jpegs, decrease the compression level, then copy back to tar archive. Unfortunately its not working, Trekbuddy wont open the modified tars. (The originals ara working)

Any suggestions please?
And sorry for my bad english.
Back to top
View user's profile Send private message
haddock



Joined: 16 Oct 2007
Posts: 209
Location: AT

PostPosted: Thu Sep 29, 2016 11:40 am    Post subject: OSM blocked? Reply with quote

Since a couple of days my mapnik xml doesn't work anymore. Is MOBAC now completely blocked by OSM (instead of limiting the amount of downloaded tiles)?
Does someone have a working xml for mapnik?

Greets, haddock

_________________
ZTE Axon 7 Mini / Nokia E61 DTBM (Dedicated TrekBuddy Machine)
Back to top
View user's profile Send private message
haddock



Joined: 16 Oct 2007
Posts: 209
Location: AT

PostPosted: Wed Oct 19, 2016 8:58 am    Post subject: Reply with quote

O. k., changing <userAgent> to a recent build of Firefox <userAgent>Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0</userAgent> in MOBAC's settings.xml does the job. Very Happy
_________________
ZTE Axon 7 Mini / Nokia E61 DTBM (Dedicated TrekBuddy Machine)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools All times are GMT
Goto page Previous  1, 2, 3 ... 49, 50, 51
Page 51 of 51

 
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