Index: doc/mkgmap-man.txt
===================================================================
--- doc/mkgmap-man.txt	(revision 1060)
+++ doc/mkgmap-man.txt	(working copy)
@@ -28,4 +28,9 @@
     displayed in the chosen character set into unaccented characters.
 
 --overview-mapname=''name''
-    This gives the name of the overview map.
+	If --tdbfile is enabled, this gives the name of the overview .img and .tdb files.
+	The default map name is OSM_map.
+	
+--overview-mapnumber=''8 digit number''
+	If --tdbfile is enabled, this gives the internal 8 digit number used in overview map and
+	tdb file. The default number is 63240000.
Index: resources/help/en/options
===================================================================
--- resources/help/en/options	(revision 1060)
+++ resources/help/en/options	(working copy)
@@ -98,7 +98,14 @@
 --series-name
 --family-name
 --area-name
---overview-mapname
+--overview-mapname=name
+	If --tdbfile is enabled, this gives the name of the overview .img and .tdb files.
+	The default map name is OSM_map.
+	
+--overview-mapnumber=8 digit number
+	If --tdbfile is enabled, this gives the internal 8 digit number used in overview map and
+	tdb file. The default number is 63240000.
+	
 
 Misc options:
 --max-jobs[=number]
Index: src/uk/me/parabola/imgfmt/app/map/Map.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/map/Map.java	(revision 1060)
+++ src/uk/me/parabola/imgfmt/app/map/Map.java	(working copy)
@@ -81,7 +81,7 @@
 	 * @throws FileNotWritableException If the file cannot
 	 * be opened for write.
 	 */
-	public static Map createMap(String mapname, FileSystemParam params)
+	public static Map createMap(String mapname, FileSystemParam params, String mapnumber)
 			throws FileExistsException, FileNotWritableException
 	{
 		Map m = new Map();
@@ -92,13 +92,13 @@
 		m.filename = outFilename;
 		m.fileSystem = fs;
 
-		m.rgnFile = new RGNFile(m.fileSystem.create(mapname + ".RGN"));
-		m.treFile = new TREFile(m.fileSystem.create(mapname + ".TRE"), true);
-		m.lblFile = new LBLFile(m.fileSystem.create(mapname + ".LBL"));
+		m.rgnFile = new RGNFile(m.fileSystem.create(mapnumber + ".RGN"));
+		m.treFile = new TREFile(m.fileSystem.create(mapnumber + ".TRE"), true);
+		m.lblFile = new LBLFile(m.fileSystem.create(mapnumber + ".LBL"));
 
 		int mapid;
 		try {
-			mapid = Integer.parseInt(mapname);
+			mapid = Integer.parseInt(mapnumber);
 		} catch (NumberFormatException e) {
 			mapid = 0;
 		}
Index: src/uk/me/parabola/mkgmap/combiners/TdbBuilder.java
===================================================================
--- src/uk/me/parabola/mkgmap/combiners/TdbBuilder.java	(revision 1060)
+++ src/uk/me/parabola/mkgmap/combiners/TdbBuilder.java	(working copy)
@@ -48,6 +48,7 @@
 
 	private int parent = 63240000;
 	private String overviewMapname;
+	private String overviewMapnumber;
 	private String overviewDescription;
 	private int tdbVersion;
 
@@ -59,11 +60,12 @@
 	 * In otherwords if the same argument appears more than once, then it will
 	 */
 	public void init(CommandArgs args) {
-		overviewMapname = args.get("overview-mapname", "63240000");
+		overviewMapname = args.get("overview-mapname", "OSM_map");
+		overviewMapnumber = args.get("overview-mapnumber", "63240000");
 		try {
-			parent = Integer.parseInt(overviewMapname);
+			parent = Integer.parseInt(overviewMapnumber);
 		} catch (NumberFormatException e) {
-			log.debug("overview map name not an integer", overviewMapname);
+			log.debug("overview map number not an integer", overviewMapnumber);
 		}
 
 		overviewDescription = args.get("overview-description", "Overview Map");
@@ -113,7 +115,7 @@
 		String mapname = finfo.getMapname();
 		String mapdesc = finfo.getDescription();
 
-		detail.setMapName(mapname);
+		detail.setMapName(mapname, mapname);
 
 		String desc = mapdesc + " (" + mapname + ')';
 		detail.setDescription(desc);
@@ -123,7 +125,8 @@
 		detail.setNetDataSize(finfo.getNetsize());
 		detail.setNodDataSize(finfo.getNodsize());
 
-		log.info("overview-mapname", parent);
+		log.info("overview-mapname", overviewMapname);
+		log.info("overview-mapnumber", parent);
 		detail.setParentMapNumber(parent);
 
 		tdb.addDetail(detail);
@@ -216,7 +219,7 @@
 
 		// We can set the overall bounds easily as it was calcualted as part of
 		// the overview map.
-		tdb.setOverview(overviewMapname, overviewSource.getBounds());
+		tdb.setOverview(overviewMapname, overviewSource.getBounds(), overviewMapnumber);
 
 		writeTdbFile();
 		writeOverviewMap();
@@ -232,7 +235,7 @@
 		params.setMapDescription(overviewDescription);
 
 		try {
-			Map map = Map.createMap(overviewMapname, params);
+			Map map = Map.createMap(overviewMapname, params, overviewMapnumber);
 			mb.makeMap(map, overviewSource);
 			map.close();
 		} catch (FileExistsException e) {
Index: src/uk/me/parabola/mkgmap/CommandArgsReader.java
===================================================================
--- src/uk/me/parabola/mkgmap/CommandArgsReader.java	(revision 1060)
+++ src/uk/me/parabola/mkgmap/CommandArgsReader.java	(working copy)
@@ -56,7 +56,8 @@
 		// line before any user supplied options.
 		add(new CommandOption("mapname", "63240001"));
 		add(new CommandOption("description", "OSM street map"));
-		add(new CommandOption("overview-mapname", "63240000"));
+		add(new CommandOption("overview-mapname", "OSM_map"));
+		add(new CommandOption("overview-mapnumber", "63240000"));
 	}
 
 	public CommandArgsReader(ArgumentProcessor proc) {
Index: src/uk/me/parabola/mkgmap/main/AbstractTestMap.java
===================================================================
--- src/uk/me/parabola/mkgmap/main/AbstractTestMap.java	(revision 1060)
+++ src/uk/me/parabola/mkgmap/main/AbstractTestMap.java	(working copy)
@@ -54,7 +54,7 @@
 
 		Map map;
 		try {
-			map = Map.createMap("32860003", params);
+			map = Map.createMap("32860003", params, "32860003");
 		} catch (FileExistsException e) {
 			throw new ExitException("File exists already", e);
 		} catch (FileNotWritableException e) {
Index: src/uk/me/parabola/mkgmap/main/MapMaker.java
===================================================================
--- src/uk/me/parabola/mkgmap/main/MapMaker.java	(revision 1060)
+++ src/uk/me/parabola/mkgmap/main/MapMaker.java	(working copy)
@@ -85,7 +85,7 @@
 
 		log.info("Started making", args.getMapname(), "(" + args.getDescription() + ")");
 		try {
-			Map map = Map.createMap(args.getMapname(), params);
+			Map map = Map.createMap(args.getMapname(), params, args.getMapname());
 			setOptions(map, args);
 
 			MapBuilder builder = new MapBuilder();
Index: src/uk/me/parabola/tdbfmt/OverviewMapBlock.java
===================================================================
--- src/uk/me/parabola/tdbfmt/OverviewMapBlock.java	(revision 1060)
+++ src/uk/me/parabola/tdbfmt/OverviewMapBlock.java	(working copy)
@@ -107,10 +107,10 @@
 		this.description = description;
 	}
 
-	public void setMapName(String mapName) {
+	public void setMapName(String mapName, String mapNumber) {
 		this.mapName = mapName;
 		try {
-			this.mapNumber = Integer.parseInt(mapName);
+			this.mapNumber = Integer.parseInt(mapNumber);
 		} catch (NumberFormatException e) {
 			this.mapNumber = 0;
 		}
Index: src/uk/me/parabola/tdbfmt/TdbFile.java
===================================================================
--- src/uk/me/parabola/tdbfmt/TdbFile.java	(revision 1060)
+++ src/uk/me/parabola/tdbfmt/TdbFile.java	(working copy)
@@ -118,10 +118,10 @@
 	 * @param name The overview map name.
 	 * @param bounds The bounds for the map.
 	 */
-	public void setOverview(String name, Area bounds) {
+	public void setOverview(String name, Area bounds, String number) {
 		overviewMapBlock = new OverviewMapBlock();
 		overviewMapBlock.setArea(bounds);
-		overviewMapBlock.setMapName(name);
+		overviewMapBlock.setMapName(name, number);
 		overviewMapBlock.setDescription(overviewDescription);
 	}
 
