Kosmos and MGMaps

From OpenStreetMap Wiki
Jump to navigation Jump to search
Logo.png
This page describes a historic artifact in the history of OpenStreetMap. It does not reflect the current situation, but instead documents the historical concepts, issues, or ideas.
About
an Application displaying maps on mobile devices
Reason for being historic
The development of Kosmos creased.
Captured time
September 2008


KosmosMGMaps2.jpg

Introduction

Since Kosmos v2.2 it is possible to generate map tiles that can be used in Mobile GMaps (MGMaps) Java Midlet (J2ME) mapping application on mobile phones. MGMaps is a free application for showing Web maps from various sources (OpenStreetMap, Yahoo, MSN and more). The default behavior is to download map tiles on demand, but the user can also download them manually and store them in the phone’s memory.

The basic steps of showing your own Kosmos maps on MGMaps are:

  1. Prepare a Kosmos project with the map data you need.
  2. Generate map tiles.
  3. Upload them to your phone.
  4. Set MGMaps to use your maps.
  5. That's it!

Benefits

MGMaps already provides access to Osmarender and Mapnik map tiles, but they either have to be downloaded on demand (thus using the mobile network which can be expensive and slow) or by mass-downloading map tiles using 3rd party software.

On the other hand the method described on this page has several advantages:

  • You have all your maps stored on directly your phone, so no mobile network is needed to access them.
  • You do not overload OSM servers by mass-downloading tiles.
  • It provides a way to have maps customized to your needs on your phone to help you with the navigation (MGMaps can connect to a GPS receiver) - I personally use it when hiking, since it allows me to display relief contours and more hiking-oriented map features.

However, be aware that map tiles can use up a lot of disk/card space on your phone. So it's advisable to map only the areas you need. You can also limit how many zoom levels to map - each zoom level takes around 4 times as much space as the level before it.

Step 1: Preparing The Map

You can prepare the map by running the Kosmos GUI, adding/downloading the OSM data, optionally generating additional features like relief contours, shaded reliefs and Web maps and saving the whole project on the disk. You can also define your own rendering rules or use any of the existing ones. See Kosmos main page for more info.

For the purpose of this short manual, we will use the "Isle of Wight" sample map provided in the Kosmos ZIP file.

Step 2: Generating Map Tiles

Go to the Kosmos\Console subdirectory and enter the following text in the command line:

Kosmos.Console.exe tilegen "..\Samples\Isle of Wight\Isle of Wight.kpr" 50.5 -1.75 51 -1 0 15 -mgm tiles Osmarender

This command will generate MGMaps tiles for the sample project, from the zoom level 0 to the zoom level 15. The tiles will be stored in the tiles subdirectory. They will act as if they were mass-downloaded from the Osmarender map server (since MGMaps currently does not have a Kosmos map type we could use).

Step 3: Transferring Tiles To The Phone

NOTE: The procedure described here works for my SonyEricsson P1i mobile phone, but it should be similar with other phones. If you have any problems please visit the MGMaps forum.

Connect the phone to your computer. Copy the files from the tiles directory on your computer to somewhere on your phone (I copied it to phone's memory stick, under the Documents directory).

Step 4: Setting Up MGMaps

  1. Start the MGMaps application on your phone.
  2. Go to the MGMaps Menu.
  3. Choose Settings.
  4. Choose Map Types and make sure Osmarender map type is turned on.
  5. Save and then choose Map Browsing.
  6. Check Stored Maps and Offline Mode options.
  7. Set the Storage Path to the path of your copied tiles. You have to point to the inner tiles/MGMapsCache directory.
  8. Save the settings. You will probably need restart the MGMaps application.
  9. After returning to the application's map view, select the Osmarender map type and move to the Isle Of Wight.
  10. You should be able to see the Kosmos map!