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 
mapexplore
Goto page 1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools
View previous topic :: View next topic  
Author Message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5673

PostPosted: Wed Dec 20, 2006 6:54 pm    Post subject: mapexplore Reply with quote

A tool by la_ouiche (original thread)

"The goal was to get a calibration file created on the fly when displaying a google map (as it seems that lots of people are interrested in).
So to make so I've started from the tdroza's script found in this forum, and now I would like to know if what I've create have sense.
Here attached is a zip file containing 3 html files ('mapexplore.html', and under 'html' directory 'map.html' and 'form.html').
To use it just double click on the mapexplore file. Then you will see the map of Paris (where I'm from ) from google maps, and from there you can navigate or enter any other position (it's trivial I know...).
The interresting part is just below the google map, there is the content of the .map file created for each map.
So after that I think what you have just to do is like Kruch said to save the map image in a .png file, and to copy and paste the data of the calibration .map file into the good named file for TB to work with.
I've also added four link at the bottom of the page that allows to get the next map on the desired direction.
I've not tested it yet because I've done it while I'm @ work , so if someone wants to let me know how it works!
Cheers"


attached: mapexplore.zip



mapexplore.zip
 Description:
mapexplore

Download
 Filename:  mapexplore.zip
 Filesize:  2.94 KB
 Downloaded:  1314 Time(s)

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



Joined: 24 Nov 2006
Posts: 60

PostPosted: Thu Dec 21, 2006 11:28 am    Post subject: Reply with quote

Quote:
The interresting part is just below the google map, there is the content of the .map file created for each map.
So after that I think what you have just to do is like Kruch said to save the map image in a .png file, and to copy and paste the data of the calibration .map file into the good named file for TB to work with.

hi, but how can i save the map image as a .png file, if i have a resulution of e.g. 2000x2000 px
thx igillan
Back to top
View user's profile Send private message
la_ouiche



Joined: 08 Dec 2006
Posts: 19

PostPosted: Thu Dec 21, 2006 12:20 pm    Post subject: mapexplore Reply with quote

Hi,

At the moment the version 1 of mapexplore seems to work correctly as described earlier.

I'm trying to add a cool feature to this tool, that will let the possibility to directly save as a gif image the map (this feature is not supported by Google Maps, it is just implemented here for testing purposes).
So you can try it now, but you have to know that the image you will get may not be the one you've displayed (specially regarding the zoom level).
And remember you will have a gif image so you will have to convert it to png by your own.


PLEASE read below if you can help to improve :
But for this feature (saving the image as gif) it's quite tricky, as I found no doc on it. So if someone has experience with google (and javascript) or knows how the google page that displays a gif image works, it will be very good. If you want to help you can edit in the zip file the 'map.html' file, there is 3 lines that need to be tuned to make it perfect (number 109, 110 and 112 to be precise). Please see the comments inside the file they will guide you.
Or if you have any information please tell I'll try to implement it! Thx
Thanks also kruch for this thread!


Last edited by la_ouiche on Fri Jan 05, 2007 4:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
igillan



Joined: 24 Nov 2006
Posts: 60

PostPosted: Thu Dec 21, 2006 12:42 pm    Post subject: Reply with quote

Hi, thx for answer.
But if i write e.g. coordinates from germany and click "saving" , the result gif-image is completly different of the screen from google maps. Confused
thx igillan



screen.jpg
 Description:
 Filesize:  161.61 KB
 Viewed:  54910 Time(s)

screen.jpg



saved_map.gif
 Description:
 Filesize:  144.02 KB
 Viewed:  54910 Time(s)

saved_map.gif


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



Joined: 08 Dec 2006
Posts: 19

PostPosted: Thu Dec 21, 2006 1:16 pm    Post subject: mapexplore Reply with quote

Updated! Now version 1.2
ok igillian, so I've just worked on it and corrected it!
So you should be able to get a gif image of your place!

Notes :
Now the main issue is that the tool does not handle negative long (W coord) and negative lat (S coord). Also the zoom calculation is weird...

Look at the code, the zoom level for the gif is calculated at the line 120 of the 'map.html' file provided. If anybody can help here it will be highly appreciated Wink


Last edited by la_ouiche on Fri Jan 05, 2007 4:05 pm; edited 3 times in total
Back to top
View user's profile Send private message
igillan



Joined: 24 Nov 2006
Posts: 60

PostPosted: Thu Dec 21, 2006 1:30 pm    Post subject: Reply with quote

hi, if i choose 2000x2000 px the program works fine Smile but if i choose
e.g.3000x3000 px i can`t save the image. (the "gif-option" is not aviable only html. What is the max resolution?
thx igillan
Back to top
View user's profile Send private message
la_ouiche



Joined: 08 Dec 2006
Posts: 19

PostPosted: Thu Dec 21, 2006 1:51 pm    Post subject: mapexplore Reply with quote

You're right I've just made some tests and it appears that the max resolution supported by the google page is 2000x2000!
Back to top
View user's profile Send private message
igillan



Joined: 24 Nov 2006
Posts: 60

PostPosted: Thu Dec 21, 2006 7:02 pm    Post subject: Reply with quote

Sad
so you can use MapCalibrator from here http://www.gpstuner.com/
MapCalibrator provide also 2000x2000 px and save calibrated maps directly from internet
thx igillan

p.s. But maps from google maps looks better. Smile I have used the "upper , down, left and right links" and create 30 maps with 2000x2000 px.
the maps i paste with photo paint to a large map with 10000x12000 px.
Calibrate map with oziexplorer. cut with TB-Cutter and make a TAR-Archive. Copy arcive to phone. Now : If i choose the map, TB hangs up Evil or Very Mad It is possible that the map is to big?
thx igillan
i have ones more cut with tb-cutter , now 400x400px . the number of slices is under 1000 (~750). copy to phone-> now it works Very Happy
Back to top
View user's profile Send private message
la_ouiche



Joined: 08 Dec 2006
Posts: 19

PostPosted: Wed Dec 27, 2006 6:11 pm    Post subject: mapexplore Reply with quote

I've created using the same idea a map of 12000x14000 px, by first saving each part (2000x2000 px gif images) with the tool like you said by navigating with the links up down left and right (also kept the 4 coord corresponding to the 4 four corners of this big map using what is under the image in the tool to create the .map file).
Then I've mixed all those gif in one big png image, and after cutted it in 500x500 pixels (with Tb Cutter) and it works very well on my phone (w850i)!
Thx for the trick, it's good to have such a map now!
Back to top
View user's profile Send private message
la_ouiche



Joined: 08 Dec 2006
Posts: 19

PostPosted: Fri Jan 05, 2007 4:02 pm    Post subject: mapexplore Reply with quote

Updated!

Hi all,
Here is the version 2.0 of the tool.
It should be more usefull with new options, so test it and find it by yourself!
There should be less bugs, and there's more functionnalities.

++



mapexplore_v2.0.zip
 Description:

Download
 Filename:  mapexplore_v2.0.zip
 Filesize:  9.86 KB
 Downloaded:  1170 Time(s)



Last edited by la_ouiche on Mon Jan 08, 2007 12:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
temptrekbuddy



Joined: 27 Nov 2006
Posts: 193
Location: Poland

PostPosted: Fri Jan 05, 2007 5:11 pm    Post subject: Reply with quote

goddammit la_ouiche you're the man! Very Happy

P.S.
I've discovered a nice way of downloading all files listed.
Currently works nice with Firefox Flashgot extension + Freeware Flashget downloader manager

the problem is you get files named (they are in order they are listed in mapexplore):
Quote:
mapdata
mapdata(1)
mapdata(2)
...
...


- Now I'm thinking of a way of renaming them using the file names generated.

I edited map.html and changed the link generation function. Now it's just a list of links with filenames on them:

Code:

txt.innerHTML += "<br/>" + "<a href='" + tmpurl + "'>" + mapname + "_" + tmpx + "_" + tmpy + ".gif" + "</a>";


Now I'm looking for a renamer which would take the list of filenames and rename the mapdata, mapdata(1)... files

Any ideas?


Last edited by temptrekbuddy on Tue Jan 09, 2007 10:57 am; edited 1 time in total
Back to top
View user's profile Send private message
la_ouiche



Joined: 08 Dec 2006
Posts: 19

PostPosted: Mon Jan 08, 2007 12:00 pm    Post subject: mapexplore Reply with quote

Interresting...
So I've created a VBScript (sorry, but it's only working on Windows systems) that make it possible.
Just copy all the gif slices in one directory (they must be named mapdata.gif, mapdata(1).gif, mapdata(2).gif, mapdata(3).gif....... and so on), and create a text file that contains on each line the file name of the gif slice (for ex. Paris_0_0.gif on the first line, Paris_640_0Gif on the second line...... and so on).
Then start the script and you will be prompt for the directories of the text file and images and also for the text file name. Just follow the instruction it is easy to use.

Enjoy

Edit: I've also modified the mapexplore package v2.0 upper, and the links given are now as you described.



RenameDownloadedGif.zip
 Description:

Download
 Filename:  RenameDownloadedGif.zip
 Filesize:  1.35 KB
 Downloaded:  176 Time(s)

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



Joined: 22 Sep 2006
Posts: 18

PostPosted: Mon Jan 08, 2007 3:39 pm    Post subject: Reply with quote

isn't there a problem with using mapdata pictures ??

If i understand it right the calibration file is for the visible map, and the tiles of the map can have a lagre area ?

If so your calibration becomes faulty... ( sorry cant find the right word hope) or inaccurate (is it the right word?)
Back to top
View user's profile Send private message
la_ouiche



Joined: 08 Dec 2006
Posts: 19

PostPosted: Tue Jan 09, 2007 11:12 am    Post subject: mapexplore Reply with quote

Hello me,
The calibration file provided changes when you change the number of slices, so normally it should be accurate with all the images you download!
Back to top
View user's profile Send private message
ME



Joined: 22 Sep 2006
Posts: 18

PostPosted: Tue Jan 09, 2007 3:53 pm    Post subject: Reply with quote

Yes, it should be accurate with large selection , but if you choose 300*300 px
then you get 4 tiles which gives 200 px error, or ?
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 1, 2, 3, 4, 5  Next
Page 1 of 5

 
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