[G1 Android Development] HardCorePawn:
new version of gMapMaker

Ok...

So I found 5 mins (which of course turned into about 12hours :D) and I updated my "hacked" version of gMapMaker to support the "andnav" version of BrutGM...

So now it can download Google Street Map tiles in the old (Z/Y/X) format and the new (Z/X/Y.png.andnav) format... as an added bonus, I also added in the ability to download Satellite tiles in these formats :cool:

The problems started when I realised that they were just plain Satellite tiles... no nifty street/road overlay... "oh... right I need Hybrid... should be easy..."

it's now 1am :eek:

Turns out that when you download a "hybrid" tile, all you get is an overlay, with transparency... so you need to "merge" a hybrid tile and it's matching satellite tile to make it useful...

So lot's of hours, lot's of modifying of code later (apparently the version of the FreeImage library included with gMapMaker didn't really like merging the tiles at all :mad:) and I seem to have a version that seems to be capable of downloading and merging things nicely :cool:

Instructions

"Now, listen very carefully... I shall say this only once..."

Step 1. Create your .map file using the tool at MapCacher.com. I suggest using "Slow and Detailed" if you're doing a large and "odd" shaped area (you don't have to select rectangles! :p) so you don't end up with large amounts of "unwanted" areas downloaded...

Step 2. Edit the .map file using a text editor and change the first line to one of the following:

BrutMap

BrutMapAndNav

BrutMapSat

BrutMapAndNavSat

BrutMapHyb

BrutMapAndNavHyb

right... are you paying attention?

BrutMap = "old" format (Z/Y/X)

BrutMapAndNav = "new" format (Z/X/Y.png.andnav)

BrutMapSat = plain Satellite pics (no placenames/roads etc) in "old" format

BrutMapAndNavSat = sat pics in "new" format

BrutMapHyb = Hybrid pics (sat+info overlay) in "old" format

BrutMapAndNavHyb = Hybrid tiles in "new" format

Confused? :confused: :p

Step 3. Run the modified version of gMapMaker.exe and configure as follows:

Cache folder - where you want the maps output to

Max Parallel Downloads - however many download threads you want to run

Wait between Requests - Checked (be nice to google servers!)

Delay (ms) - 1000 (seriously, don't hammer their servers!)

Operating Mode - BrutMaps or BrutMapsAndNav mode (depends on how you setup the .map file)

HashSize - 1 (V. Important!)

Tiles per File - 1 (also V. Important!)

All other settings will either be greyed out, or you can set as you wish... I don't use proxy's so don't ask me how to set them up.

Step 4. Click "Go" - and then select your edited .map file

Step 5. Go and make a cup of tea while your bandwidth gets sucked up downloading map tiles :p

Step 6. You'll find the output tiles in the folder you specified as the "Cache folder"/MGMapsCache... they will then be stored in either BrutMaps, BrutMapsAndNav, BrutMapsAndNavSat, BrutMapsSat etc. etc...

NOTE: if you chose Hybrid... the tiles you want will actually be in BrutMapSH or BrutMapAndNavSH (the Hyb dir's only contain the tiles with just the overlay info) depending on what you put in the .map file.

Step 7. Copy to your phone... The files go in the "tiles" folder in the brut.googlemaps dir on your /sdcard:

If using the andnav version of GM:

If using the "old" version of GM, it works the same, but uses the /sdcard/brut.googlemaps/tiles/ dir

NOTE: This will:

a. take a loooooong time if you downloaded a large area to a very high zoom

and

b. take up a laaaaaaarge amount of storage space on your sdcard due to the tiles being like 1k and the default cluster size probably being something like 4k... hopefully Brut.all will be able to mod it so it reads the nice single file "atlas" formats at some point in the future!

Step 8. read all of these instructions again before asking questions :rolleyes:

You can find v0.2 of gMapMakerHCP here: http://www.multiupload.com/TY1MU3SCA0

cheers,

HCP