![]() |
2006-05-14
, 12:36
|
Posts: 6 |
Thanked: 0 times |
Joined on Feb 2006
|
#81
|
![]() |
2006-05-14
, 14:30
|
Posts: 9 |
Thanked: 0 times |
Joined on Apr 2006
|
#82
|
Here's a patch that adds Google satellite map support to MaemoMapper:
http://mg.pov.lt/maemo-mapper-0.1-su...sat-maps.patch
![]() |
2006-05-14
, 16:06
|
Posts: 182 |
Thanked: 3 times |
Joined on Mar 2006
|
#83
|
for those who use windows at home, I made a windows application to help you download maps for maemo-mapper on your computer and transfer them on your nokia 770 when you need them. here is the link:
http://www.barghis.com/winmapper.htm
the app maps are comparible with maemo-mapper, I used qnuite's code (converted to delphi) to download the maps.
the source code is included
thanks,
-ioan
![]() |
2006-05-14
, 19:36
|
Posts: 31 |
Thanked: 2 times |
Joined on Apr 2006
@ Vilnius, Lithuania
|
#84
|
I have one problem when using maemo-mapper: I use Globalsat BT-338 as GPS receiver. Maemo-mapper can`t connect whith it. After enter MAC and "enable GPS" apears banner "Searching fo GPS receiver", after some time, when bt-338 connected to 770 banner start blinging. The GPS position be about Africa i point whith coordinates (1,1). I have waiting and i have`t right result. Can anybody help me?
![]() |
2006-05-14
, 19:41
|
Posts: 31 |
Thanked: 2 times |
Joined on Apr 2006
@ Vilnius, Lithuania
|
#85
|
I've tried your patch, and it works great!.
The problem is that I want to maintain both systems (maps and topo) and I have to change URI prefix and directory of maps every time. I am working in which it can be two different definitions for URI/directory (maps and topo) and we could exchange easily among them. I hope to have something for tomorrow (it depends how fast i can learn to programme in maemo) . I already have something, but it crash when change each other for two times.
#!/bin/sh # Ask Maemo Mapper to use satellite maps from Google gconftool-2 -s /apps/maemo-mapper/map_uri_format -t string 'http://kh.google.com/kh?n=404&v=6&t=%s' ln -sf /media/mmc1/maps/sat /home/user/apps/maemo-mapper
#!/bin/sh # Ask Maemo Mapper to use street maps from Google gconftool-2 -s /apps/maemo-mapper/map_uri_format -t string 'http://mt.google.com/mt?n=404&v=w2.11&x=%d&y=%d&zoom=%d' ln -sf /media/mmc1/maps/street /home/user/apps/maemo-mapper
![]() |
2006-05-14
, 19:57
|
Posts: 191 |
Thanked: 10 times |
Joined on Feb 2006
|
#86
|
for those who use windows at home, I made a windows application to help you download maps for maemo-mapper on your computer and transfer them on your nokia 770 when you need them. here is the link:
http://www.barghis.com/winmapper.htm
the app maps are comparible with maemo-mapper, I used qnuite's code (converted to delphi) to download the maps.
the source code is included
thanks,
-ioan
![]() |
2006-05-14
, 21:00
|
Posts: 61 |
Thanked: 36 times |
Joined on Feb 2006
@ Harpenden
|
#87
|
#!/usr/bin/env python import sys,os from math import * from optparse import OptionParser from urllib import urlretrieve MERCATOR_SPAN=(-6.28318377773622) MERCATOR_TOP=(3.14159188886811) WORLD_SIZE_UNITS=(1 << 26) def latlon2unit(lat, lon): unitx = (lon + 180.0) * (WORLD_SIZE_UNITS / 360.0) + 0.5 tmp = sin(lat * (pi / 180.0)) unity = 0.50 + (WORLD_SIZE_UNITS / MERCATOR_SPAN) * (log((1.0 + tmp) / (1.0 - tmp)) * 0.50 - MERCATOR_TOP); return (unitx,unity) def tile2zunit(tile, zoom): return ((tile) << (8 + zoom)) def unit2ztile(munit, zoom): return ((int)(munit) >> (8 + zoom)) def loadImage(x,y,zoom): url = "http://mt.google.com/mt?n=404&v=w2.11&x="+str(x)+"&y="+str(y)+"&zoom="+str(zoom) destination = dirpath+"/"+str(y)+".jpg" if(os.access(destination,os.R_OK) == False): print "Downloading "+url+" to "+destination else: print "Already got " + destination urlretrieve(url,destination) parser = OptionParser() parser.add_option("-t", "--start-lat", dest="startlat",help="start latitude",type="float") parser.add_option("-l", "--start-long",dest="startlong",help="start longitude",type="float") parser.add_option("-b", "--end-lat", dest="endlat",help="end latitude",type="float") parser.add_option("-r", "--end-long",dest="endlong",help="end longitude",type="float") parser.add_option("-z", "--zoom",dest="zoom",help="zoom level",type="int") (options, args) = parser.parse_args() (sux,suy) = latlon2unit(options.startlat,options.startlong) (eux,euy) = latlon2unit(options.endlat,options.endlong) if eux < sux: x = eux eux = sux sux = x if euy < suy: y = euy euy = suy suy = y start_tilex = unit2ztile(sux, options.zoom + 1); start_tiley = unit2ztile(suy, options.zoom + 1); end_tilex = unit2ztile(eux, options.zoom + 1); end_tiley = unit2ztile(euy, options.zoom + 1); numMaps=(end_tilex-start_tilex)*(end_tiley-start_tiley) print "About to retrieve "+str(numMaps)+" maps" for x in range(start_tilex,end_tilex): dirpath="maps/"+str(options.zoom)+"/"+str(x) if(os.access(dirpath,os.W_OK) == False): os.makedirs(dirpath) for y in range(start_tiley,end_tiley): loadImage(x,y,options.zoom)
./getMaps.py -h usage: getMaps.py [options] options: -h, --help show this help message and exit -t STARTLAT, --start-lat=STARTLAT start latitude -l STARTLONG, --start-long=STARTLONG start longitude -b ENDLAT, --end-lat=ENDLAT end latitude -r ENDLONG, --end-long=ENDLONG end longitude -z ZOOM, --zoom=ZOOM zoom level
./getMaps.py -t 51.82 -l -0.3 -b 51.49 -r 0 -z 4
![]() |
2006-05-14
, 22:29
|
Posts: 481 |
Thanked: 190 times |
Joined on Feb 2006
@ Salem, OR
|
#88
|
great tool!
but there's a slight problem with the lat/log parsing, if the decimal seperator in the system/locale is not "." (ie. if it's ",") then you have to fix the coordinates (replace "."'s with ","'s) or it won't parse them.
![]() |
2006-05-15
, 03:29
|
Posts: 191 |
Thanked: 10 times |
Joined on Feb 2006
|
#89
|
you mean when you read from the .kml file? I knew from the moment I wrote the code that that will be a problem, but I have no idea what char they use to separate the two coordinates (what char from regional settings). if the decimal symbol is a "," will the coordinates be separated by "." ? :-) post here an example of a kml file, with your regional settings and I will fix it.
-i
![]() |
2006-05-15
, 03:49
|
Posts: 481 |
Thanked: 190 times |
Joined on Feb 2006
@ Salem, OR
|
#90
|
the coords in the .kml file are correct (with "." as the dec seperator) and are loaded OK, but when you hit "download" delphi throws out an exception saying that it can't parse the float. you edit the coords (replacing the "." with ",") and hit download again, it works.
regional stuff in the control panel are Turkish/Turkey.