Adding Google Maps into Mobile Atlas Creator

Mobile Atlas Creator is an awesome tool for generating offline maps for mapping applications, such as the equally awesome RMaps for Android. Unfortunately, due to restrictions from many map providers, Mobile Atlas Creator no longer provides access to many map sources.

However, it is able to read user-customised map sources. So with the help of httpfox, I have managed to get google maps hooked up again. Just unzip the following files into the “mapsources” subdirectory of your Mobile Atlas Creator installation location, and then restart it.

Enjoy!

Google Maps (google_map)

<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
    <name>Google Maps</name>
    <minZoom>0</minZoom>
    <maxZoom>19</maxZoom>
    <tileType>png</tileType>
    <tileUpdate>None</tileUpdate>
    <serverParts>0 1 2 3</serverParts>
    <url>http://mt{$serverpart}.google.com/vt/lyrs=m@144&amp;hl={$lang};&amp;x={$x}&amp;y={$y}&amp;z={$z}</url>
    <backgroundColor>#000000</backgroundColor>
</customMapSource>

Google Satellite (google_satellite)

<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
    <name>Google Satellite</name>
    <minZoom>0</minZoom>
    <maxZoom>19</maxZoom>
    <tileType>PNG</tileType>
    <tileUpdate>None</tileUpdate>
    <serverParts>0 1 2 3</serverParts>
    <url>http://khm{$serverpart}.google.com/kh/v=138&amp;x={$x}&amp;y={$y}&amp;z={$z}</url>
    <backgroundColor>#000000</backgroundColor>
</customMapSource>

Google Satellite + Overlay Hybrid (google_satellite_hybrid)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customMultiLayerMapSource>
    <name>Google Satellite Hybrid</name>
    <tileType>PNG</tileType>
    <layers>
        <customMapSource>
            <name>Google Earth</name>
            <minZoom>0</minZoom>
            <maxZoom>19</maxZoom>
            <tileType>PNG</tileType>
            <tileUpdate>None</tileUpdate>
            <serverParts>0 1 2 3</serverParts>
            <url>http://khm{$serverpart}.google.com/kh/v=138&amp;x={$x}&amp;y={$y}&amp;z={$z}</url>
            <backgroundColor>#000000</backgroundColor>
        </customMapSource>
        <customMapSource>
            <name>Google Earth Maps Overlay</name>
            <minZoom>0</minZoom>
            <maxZoom>19</maxZoom>
            <tileType>png</tileType>
            <tileUpdate>None</tileUpdate>
            <serverParts>0 1 2 3</serverParts>
            <url>http://mt{$serverpart}.google.com/vt/lyrs=h@145&amp;hl={$lang}&amp;x={$x}&amp;y={$y}&amp;z={$z}</url>
        </customMapSource>
    </layers>
</customMultiLayerMapSource>

Google Terrain (google_terrain)

<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
    <name>Google Terrain</name>
    <minZoom>0</minZoom>
    <maxZoom>19</maxZoom>
    <tileType>png</tileType>
    <tileUpdate>None</tileUpdate>
    <serverParts>0 1 2 3</serverParts>
    <url>http://mt{$serverpart}.google.com/vt/lyrs=t,r&amp;hl={$lang}&amp;x={$x}&amp;y={$y}&amp;z={$z}</url>
    <backgroundColor>#000000</backgroundColor>
</customMapSource>

If you look at the url in the files, you can see that all the map tiles are downloaded from 1 google server mt0, when in google maps, tiles are downloaded from mt1 as well for load distribution. I don’t know if Mobile Atlas Creator supports this or not.

If I ever get to figure out how Bing or Yahoo map tiles are named, then I’ll probably post about them. But it is likely I won’t get to that 😛

Edit (10 Apr 2012):
This forum topic, post #6 suggests to copy the map source files over from an older version:
http://www.noeman.org/gsm/creating-maps/201179-mobile-atlas-creator.html
Yahoo & Google maps seems to work for me as well, while Microsoft/Bing maps didn’t. Didn’t test with other map sources.

Edit (7 Oct 2013)
Tested and updated the urls. They should now work again, but requires MOBAC 1.9 Beta 7 or newer, as it uses for parallel downloads from google servers.

14 Responses to Adding Google Maps into Mobile Atlas Creator

  1. valtersam says:

    Thanks from ukrainian customers of android :))) its works very well for my offline maps in Locus apps :))) google maps available again !!! :)))

  2. zucchero says:

    Hi! Your solution for google terrain does not work anymore. Only a black screen pops up.
    Can you help please?

  3. loonychewy says:

    @zucchero,
    I didn’t realise that google terrain no longer works. Thanks for pointing it out. I have updated it and the download file google_terrain.zip, with thanks to the information provided here:
    http://oruxmaps.foroactivo.net/t1884-google-terrain-maps-are-black-with-white-roads
    Be sure to empty your google terrain cache to redownload the new map tiles from the google server. I did it by manually deleting the tilestore\db-Google Terrain folder, though you can do it from within MOBAC via the settings dialog box.

  4. Miso says:

    Hi. I tried to put Google Satellite + Overlay Hybrid into MOBAC but it works only with 9-13 zoom levels. Please can you fix it again ? Thanks. I was using MOBAC 1.9.10.

  5. ubugnu says:

    Hi Miso,
    I’ve found how to recover google satellite maps on mobac, juste change
    http://khm0.google.com/kh/v=88&x={$x}&y={$y}&z={$z}
    to
    http://khm0.google.com/kh/v=126&x={$x}&y={$y}&z={$z}
    in its xml file

  6. loonychewy says:

    Thanks for the solution, ubugnu!

  7. Anonymous says:

    If you look at the url in the files, you can see that all the map tiles are downloaded from 1 google server mt0, when in google maps, tiles are downloaded from mt1 as well for load distribution. I don’t know if Mobile Atlas Creator supports this or not

    I believe you want servernum: http://mt{$servernum}.google.com/vt/lyrs=m@156000000&hl={$lang}&x={$x}&y={$y}&z={$z}

  8. loonychewy says:

    Oh nice one! Didn’t know that. Thanks!

  9. Anonymous says:

    oh I got that from mapsources.properties MOBAC 1.8

    http://pastebin.com/61ULkFyc

  10. vairav says:

    pl update always on link file of google sattellite hybrid mapsourse xml file url…….now is working fine, thanks

  11. loonychewy says:

    @vairav, thanks for your interest in this post. Google changes the map URLs once in a while, so it is with the help of all the kind commenters like you that I can keep it up to date whenever that happens.

  12. seb says:

    Does anyone have a problem with gterrain? mine show black parts of the map depending on where and the zoom level i’m in….

  13. joe gates says:

    Could you please explain how do you add the html lines to the map sources folder which now contain exe jar files . This folder will not allow me to copy and paste the html lines in that folder as it seems the folder is write protected ?

    Thanks for any light you may shed for me

  14. joe gates says:

    Stumbled upon my answer lol
    The html code is in a zip download link at the top of each html code example / just click on the words google satellite and a zip download will begin after the download has completed simply copy the html item into the mapsources folder !! Worked like a CHARM
    Thank you imensely to the poster that shared this info !!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">