Creating maps has become very easy as long as your desired map is not too large.
Go to extract.bbbike.org. Select on the left “Mapsforge OSM” as format. Go to your desired area and create a bounding box over it. Check the pre-calculated map size on the left. It must not exceed 400 MB. Enter you email and a name for the file. Push extract. Depending on the file size you will receive a mail containing a link to a zip file within 15 min up to some hours. When downloaded and unzipped you find a .map file named after the locations of the bounding box. Rename it as you like, leaving the extension “.map”. Copy it to your phone and select it. You’re done!
If you need larger files follow the long tutorial :
This is a tutorial how to create your own map. You should have some experience with the terminal and some time
The Tutorial was originally created by Tinkerpete.
There are two ways to create a map:
1. Clip an area directly from extract.bbbike.org
2. download precompiled raw data from cloudmade, which covers the usual regions and hence is about the same as the maps which are already available
Therefore I describe only the first, if you want the second look at Tinkerpete’s site !
Select on extract.bbbike.org the wanted area, set an name, a mail adress and note down the box coordinates as they are needed later! Select pbf as file format and click finally on ‚extract’. You will get a mail with the link to the file after some time !
In the osmosis-Root-folder create a folder “plugins” and move there the ‚mapsforge-mapfile-writer-0.3.0.jar’ and two folders “data” and “tmp”
Now place the downloaded osm.pbf file into the /data folder. Move in the terminal to the osmosis root folder. When done you need only one command for creating the .map file:
bin/osmosis --rb file=data/map.osm.pbf --mapfile-writer file=tmp/mymap.map bbox=45.8594,10.8402,45.8995,10.8986
Set in bbox your coordinates in the right order! On Windows : replace / by \ !
Now it will take some time, depending on the amount of data and the power of your PC ! For a 1 GB file it will take a whole day! When done the file will be in the “tmp” folder.
Some extra advices, thanks to Stephan for these:
To make it work out, the JAR files must have the X flag set. Make them executable with chmod + x. If you get an OutOfMemoryError you must enlarge the Java heap size. In the /bin directory edit the file osmosis and add in the first place the following:JAVACMD_OPTIONS =-Xmx2048m
The latitude/longitude in the extract tool are the other way around as osmosis expects them. So swap the values, otherwise you get only empty files!