1 Attachment(s)
PHP script for routes, POI files in /PSP/COMMON
Hi all :)
I found it quite annoying that the only way to place routes (POI files with WAYPOINT) in MapThis is by means of a PC (e.g. GMDL). I thus made a small script that basically does the same thing. You can find it at:
http://getroute.nieko.net/
(The source can be found at http://nieko.net/tools/getroute.phps.)
I know the algorithm for deciding what MIDPOINTs to take out looks rather random, but for me it seemed to work just fine :) If anyone has suggestions on how to improve this, then feel free to tell me!
The idea is that you can access this script using the PSP browser, and then save the file it returns to a folder in MapThis. Of course you still need a WiFi connection for this, but at least you do not need a PC anymore :) Unfortunately, the stupid PSP browser only wants to save in a few directories, including /PSP/COMMON.
I thus made a few alterations to the MapThis source:
- _MY_POIS has been renamed to _#MY_POIS, so that it shows up at the top of the POI list.
- POI files are read from /PSP/COMMON by default (this includes _#MY_POIS). These show up in the POI list in MapThis as "ms0:/PSP/COMMON/_<name>". The added benefit of this is that route files are now accessible in every map.
- POI files are still also read from the map directory, as in the official version.
- When showing POI files, it doesn't also show _#MY_POIS anymore.
- Icons used in POI files are now always read from MapThis/system/icons.
- The makefile has been slightly changed (removed BUILD_PRX=1), cause otherwise the thing wouldn't compile :P
In the attachment, you can find the patch for MapThis 0.497 beta, and the PSP-290 EBOOT with this functionality.
The patch should be applied in the src/ directory (where main.c, etc. are), and should be called using: cat mapthis-patch | patch -p1
Enjoy :)
German Routes äöüß Converter
Hi,
i have written a small vb script to convert the created routes with strange signs to the german "specials".
ä = ä(ae), ö = ö(oe), ü = ü(ue), ß = ß(ss)
In the moment only for lowercase signs.
Put the code in an text file and name it "filename.vbs". Drag and drop the route on the script and an "_GER" version is created.
Please report any problems.
--script begin--
'ä = ä
'ö = ö
'ü = ü
'ß = ss or ß
Const ForReading = 1
Const ForWriting = 2
mydebug = 0
Set objFSO = CreateObject("Scripting.FileSystemObject")
Filename = Wscript.arguments(0)
Filename2 = Filename+"_GER"
if mydebug = 1 then
Wscript.Echo(Filename)
Wscript.Echo(Filename2)
end if
Set objFile = objFSO.OpenTextFile(Filename, ForReading)
Set objFile2 = objFSO.OpenTextFile(Filename2, ForWriting, True)
Do Until objFile.AtEndOfStream
MyTextLine = objFile.ReadLine
MyTextLine = Replace(MyTextLine,"ä","ae") 'ä
MyTextLine = Replace(MyTextLine,"ö","oe") 'ö
MyTextLine = Replace(MyTextLine,"ü","ue") 'ü
MyTextLine = Replace(MyTextLine,"ß","ss") 'ß/ss
objFile2.WriteLine MyTextLine
Loop
objFile.Close
Wscript.Echo("FINISH")
--script end--
I know that can be coded better, but it's my first VB Script.
Cheers
GoDE
Edited: Code changes 18-Sept