Search in uioop.blogspot.com

Blog Archive

Wednesday, December 19, 2007

Mobile GMaps - Installation for Nokia N95

http://gmaps.freewebspace.com/
Acknowledgements:
Mobile GMaps is copyright © 2005-2007 by Cristian Streng (Thank you very much, your work is fantastic!!)
If there are any issues I will remove this page upon your request.
Forums
The Objectives :

Download and install Mobile Gmaps to your Nokia N95
Download map tiles and configure Mobile Gmaps to use them as "stored maps"

Assumptions:


You have a Nokia N95 (lol, sorry, it had to be said.. :D)
This is the first attempt at installing Mobile Gmaps and stored maps (eg. not previously installed)
You are running Windows XP SP2 as the OS for which you will be executing the perl script and downloading map tiles
The PC you are using to download the map tiles has a native internet connection and does not rely on the use of a proxy
The microSD memory card in your phone has sufficient free space for the stored maps
You know how to establish a connection between your N95 and your PC (bluetooth or USB cable), or
You know how to transfer files to your microSD memory card
You will use the software and process that follows to achieve the desired outcome
You understand english (If not, you've persisted well and are probably attracted by the pretty colours on the page while not understanding a word)

If "no" to any of the above, then it's possible "steps" will fail and this brief instruction will not cater for every alternative software or process. I can only say that the following worked for me and I took the points from the forums that "tripped" other people up. (lol @ the disclaimer of sorts...)

What you will
Need to Download:

N95 Alpha JAD File: mgmaps_n95-1_34_02-signed.jad (Current at the time of writing)
N95 Alpha JAR File: mgmaps_n95-1_34_02.jar (Current at the time of writing)
Perl Script: MapTileCacher.perl (current at the time of writing)
Perl for Windows: ActivePerl version 5.8.8.820
WGET: wget for Windows

Step 1
Installing Mobile GMaps:
Transfer the downloaded .JAD and .JAR files to the microSD memory card temporarily to install. In my example I have a folder called "installs" on the root of my memory card (E: )

Go to File Manager


Select the Memory Card and navigate to the folder you transferred the .JAD and .JAR too. (in my case "Installs"), you will then see the two files.

Ensure you install from the .JAD file and not the .JAR file. (This is crucial!). Check this by selecting "View Details" from the options menu.

When confirmed that you have the .JAD file, click ok and then select to open and continue the install.
Unless you really want to install the app to the phone memory, select the memory card instead and allow the installation to complete.

That completes the installation of Mobile GMaps (Yes, I like old school arcade games... Go Galaga!! :D)
Step 2
Installing Activeperl:
Install the previously downloaded version of Activeperl and accept all installation defaults except where directed.
Accept the license agreement (obviously)
Unless you really feel the need too, don't bother changing the default installation path
Don't display the release notes (we have more cooler things to do... :D)
Step 3
Copying wget:
Copy wget.exe that you previously downloaded, into C:\perl\bin (assuming you installed activeperl in the default location, otherwise change as appropriate.)
Step 4
Downloading Map Tiles:
Create a new folder on your PC (In my case C:\GMaps) and copy the previously downloaded MapTileCacher.perl file to it.
Rename the file extension from .perl to .pl. You should notice the .pl extension becomes associated with Activeperl
Execute perl script:
Double Click the MapTileCacher.pl file in explorer and you should get this window
Map Type:
Choose the map type you require. As in this example, type "GoogleMap" (without the quotation marks) NOTE: The input is case sensitive so do not enter "googlemap" else it will fail
Zoom Level:

For GoogleMap there are 20 zoom levels. Each representing various distances or resolutions, as follows...


Level - Distance
0 = 3000km
1 = 2000km
2 = 1000km
3 = 500km
4 = 200km
5 = 100km
6 = 50km
7 = 30km
8 = 20km
9 = 10km
10 = 3km
11 = 2km
12 = 1km
13 = 500m
14 = 200m
15 = 100m
16 = 50m
17 = 30
18 = 20
19 = 10m

Choose the zoom level from 0 - 20. I personally use level 15 or 16 for street detail and level 9 for main highway (long distances) detail. You also have the ability to get a number of different levels for the same area which allows you to zoom in or out to the levels your memory card has. For the sake of this test, just choose one, say zoom level 15.

Coordinates:
Ok, now you need to define the area for which you want map tiles for. These coordinates are required to be entered in decimal degrees format. I personally recommend using the following tool that helped me considerably. Time for a small deviation...

Go to URL http://www.mapbuilder.net/ and navigate to the part of the world of interest to you. In my case, New Zealand, specifically a city called Lower Hutt in the bottom part of the North Island of New Zealand (Soon to be home of the America's cup and rugby world cup again, I hope! But I digress...)
Zoom in at the appropriate level of detail. Note that the zoom level represented here is what you can expect when the tiles are downloaded, so what you see here might influence your previous decision regarding the zoom level.
Top left:
Click the map at the upper left most part for the area you want. (You may wish to untick the automatically zoom in option. I found it a pain) It will add a red tear drop marker. Note the Latitude and Longitude values on the right hand side. Enter the numbers exactly as they are on the left side of the decimal point and 6 numbers on the right side of the decimal point.
eg. Latitude -41.1904103623711 would be represented as -41.190410
eg. Longitude 174.86303329467773 would be represented as 174.863033


Top Left entered as -41.190410, 174.863033
Bottom right:
Click the map at the lower right most part for the area you want. It will move the red tear drop marker. Note the Latitude and Longitude values on the right hand side. Enter the numbers exactly as they are on the left side of the decimal point and 6 numbers on the right side of the decimal point.
(as in the above example)


Bottom Right entered as -41.236898, 174.925518

Ready to Cache:

At this point the following information will be confirmed:
- Amount of tiles to be cached (in my case 49)
- Map Type (in my case GoogleMap)
- Zoom Level (in my case 15)



Press enter to continue and the download process will begin, as follows...

Download:
Depending on the area and zoom level, wget may take some time to complete, however, at the completion, the script will close and you should have a MGMapsCache folder in the root of the folder you executed the perl script from. In my case C:\GMaps\MGMapsCache\. Inside you should have a folder called GoogleMap_15. The number 15 relates to the zoom level selected so this may be different depending on what you chose.
Advanced:
Before upload the resulting files to your phone, you could potentially re-run the perl script and download map tiles of the same or a different area, at a different zoom level. I have done this as follows...
Top left and bottom right area covers my whole country (New Zealand) which admittedly is not big, but downloaded at a zoom level of 9 (10km) and this is great for when I am travelling the open road and wanting a resolution of towns and cities. I also reset my top left and bottom right to my home city of Wellington (greater Wellington region) at a zoom level of 16.
Now I have two folders in my MGMapsCache folder each representing the two zoom levels and area of coverage. Now when I move outside my main city I need to either zoom out to 10km or download more map tiles.

Step 5:
Transfer to Phone

Ok, so arguably the hard bit is done, now you just have to get it to the phone. For obvious reasons of size, you will be wanting to transfer these to the memory card
Either connect the phone to your PC via USB or bluetooth (for obvious reasons of speed, USB is preferred over bluetooth), or remove the memory card and insert into the PC via a media card reader/adapter. For the following, I am using a USB connection bewteen my N95 and PC.
Plug in your N95 via USB to your PC. If your N95 is set to ask on connection, select the mass storage mode.
Once the phone has been connected to the PC, evidence you can see it in explorer. Copy the folder C:\GMaps\MGMapsCache\ to the root of your memory card, as follows... (In my case, my memory card is labelled "Nokia 2GB" and the PC sees it as H: drive.



Your phone should reference the card as E: drive when it in the phone but when connected to the PC, this could be anything. When complete unplug the phone.
Step 6:
Stored Maps:

Open MGMaps, When asked whether to allow MGMaps to use the network, say no (so we can test our results with assurance)
Obviously as a result of the previous answer there are no map tiles. Go to the menu and select "Settings"
Select Map Browsing, then select/tick Stored Maps. (Also choose Offline Mode if this is desired)
Check the storage Path and ensure it is set to E:. Save the settings and exit the application.
Step 8:
Preferences:
Before you restart MGMaps, you will want to change some application preferences to prevent being nagged on application start
Go to tools and open the Application Manager
Navigate to Mobile GMaps and select "open"
Navigate to "Read user data" and select "Always allowed"
Save options and exit.
Finished:
Now, assuming my instructions are correct and that you have followed them, you should be able to fire up Mobile GMaps and enjoy your downloaded map tiles.
Here is a portion of the area I cached at zoom level 15.
Here is the same point at zoom level 9

No comments:

AVG Internet Security 2013

Total Pageviews

Contributors