Offline maps with DroidPlanner / 3DR Tower

A Nexus 7 tablet is an excellent choice as the Ground Control Station (GCS) with DroidPlanner2 or 3DR Tower for your IRIS or other quadcopter. But in order to keep costs in a reasonable manner, using the Wifi-only model makes a lot of sense. Yet, doing so one wants to still use maps in DroidPlanner2 while being out in the field.

DroidPlanner2 and 3DR Tower already offers map caching via the Google Maps API out of the box. If a user zooms the map somewhere while connected to Wifi, disconnects from Wifi, closes the app, reloads the app, it will still show you the map area from before. But DroidPlanner2 doesn’t have control on how much of the area is cached. You might end up with the desired map area not being cached, showing you either a blurry map or a blank map.
To overcome this shortcoming you will need the offline map feature of DroidPlanner2 and 3DR Tower, which stores map tiles in a special folder for DroidPlanner2 and 3DR Tower to be used. This allows you to be sure that the map area that you need is always available while the Android device has no network connectivity.

In this post I’ll show you, how you can use the offline map feature in DroidPlanner2 and 3DR Tower to accomplish exactly this: Be out in the field without network connectivity and have your maps available.

Note: I recommend to place your Nexus 7 or any other tablet into flight mode – thus disabling any radio module in it – during flight operations. Especially as I have mounted the GCS very close to the R/C transmitter, this reduces the risk of radio interference on the 2.4 GHz band between the WiFi module of the Nexus 7 and the R/C transmitter.

Required software and version

  • DroidPlanner2: The current version of DroidPlanner2, available on Google Play, does support usage of Offline Maps.
    or Tower (DroidPlanner 3), which requires 3DR Services as well.
  • Mission Planner: The latest version of Mission Planner is available from the APM Download section.
  • A file manager for Android, such as “File Manager (Explorer)”, available on Google Play.

How-to use

First we need to assemble the offline maps in Mission Planner on the PC. For this open Mission Planner and change to the Flight Plan tab. Zoom in or out to the area for which you want to create an offline map.
Hold down the “Alt” button on your keyboard and draw a box around the area that you desire for your offline maps (See Figure 1).

Figure 1: Draw the map area  on the flight plan screen

Figure 1: Draw the map area on the flight plan screen

Next zoom in to the level at which you want the offline maps to be captured. Then perform a right-click in the map area and select Map Tool -> Prefetch (See Figure 2) to start the map ripping.

Figure 2: Chose Map Tool -> Prefetch

Figure 2: Chose Map Tool -> Prefetch

Confirm the zoom level at which you want to start the map ripping with a click on the “Yes” button.

Figure 3: Confirm the zoom level

Figure 3: Confirm the zoom level

Wait for the map titles to be fetched (ripped). Mission Planner will try to ripp the maps beyond the zoom level that you previously defined. Once the zoom level displayed is higher than your desired zoom level, press the “ESC” button twice quickly (See Figure 4). This will end the map fetching and save you time.

Figure 4: Mission Planner fetching map tiles

Figure 4: Mission Planner fetching map tiles

Navigate to the map file folder %ProgramFiles(x86)%Mission PlannergmapcacheTileDBv3enGoogleSatelliteMap on a 64-bit system or %ProgramFiles%Mission PlannergmapcacheTileDBv3enGoogleSatelliteMap on a 32-bit system (See Figure 5). If you were using a different provider of maps in Mission Planner, other than the Google Satellite Maps, navigate to the corresponding folder. In this folder you’ll notice subfolders, which correspond to the zoom levels. Delete the folders that have a higher number than the zoom level that you desire. Compact the remaining folders and all their content into a single Zip file, called e.g. “maps.zip”. Copy this file to your Android tablet, e.g. using Google Drive.

Figure 5: Map Tiles downloaded  in the map cache folder

Figure 5: Map Tiles downloaded in the map cache folder

 

On your Android tablet, use a File Manager and navigate to the folder /storage/emulated/0/DroidPlanner/Maps. Unzip the previously created Zip file into this folder. This should create the numbered subfolders and their content (See Figure 6).

With Tower (Droidplanner 3) this folder is called /storage/emulated/0/Tower/Maps instead.

Create an empty file named “.nomedia” inside the /storage/emulated/0/DroidPlanner/Maps or /storage/emulated/0/Tower/Maps folder. This will prevent Android to treat the map images and media and will not show them in your Images application.

Figure 6: DroidPlanner2 offline map folder in Android File Manager

Figure 6: DroidPlanner2 offline map folder in Android File Manager

Next open DroidPlanner2 or 3DR Tower and navigate to the User Preferences screen under Settings. Tap on the Map Provider Preferences (See Figure 7).

Figure 7: Maps section in the User Preferences screen

Figure 7: Maps section in the User Preferences screen

Set the tick box next to “Use offline maps” (See Figure 8).

Figure 8: Tickbox for "Use Offline Maps"

Figure 8: Tickbox for “Use Offline Maps”

Return to the Flight Data screen. You will see offline maps available, even when disabling the WiFi connectivity.

Figure 9: DroidPlanner2 with offline maps displayed

Figure 9: DroidPlanner2 with offline maps displayed

It would be great if DroidPlanner2 or 3DR Tower itself had the ability to define a map area and download the map tiles, while connected to a WiFi network. This would safe users from the hassle of having to use Mission Planner.

Tagged with: , ,
14 comments on “Offline maps with DroidPlanner / 3DR Tower
  1. John O'Shaughnessy says:

    Fanastic, and once again, very timely!

  2. Eugene Jackson says:

    I’m a bit confused by these instructions. Are you indicating that you need a PC in order to cache a map to use with Droid Planner 2 on your Android tablet?

    • With APM planner on the Mac you’re supposedly also able to download the offline maps. But I don’t know how as I don’t have a Mac.

    • Ben says:

      I believe he is, you have compress and transfer the files, then unpack and use them from pc to tablet.

  3. Dan says:

    I placed the “.nomedia” file in the “maps” folder and still get the map images in my photo apps. – need some advice.

    Thanks

    P.S. I restarted my tablet an d had the same results.

    • Dan says:

      Solved the problem. The images were being displayed from a backup folder on my sd card.

      • David Pulvermacher says:

        Hi Dan. Can you explain how you solved the problem please.
        I have done exactly as described in the instruction, and it seems as you did.
        How does one tell Driodplanner/Tower where to look for the images?
        This is driving me nuts!

  4. Andy H says:

    I connected my Nexus 7 to the PC, created
    /storage/emulated/0/DroidPlanner/Maps
    and then put the maps I downloaded from Mission Planner into the folder.
    I selected the option in user preferences to use offline maps but no map is displayed.

    I’ve turned the device on and off but still nothing.

    Thoughts anyone?

    • traveller says:

      Andy, did you ever solve this problem?
      I’m having the same issue.

      • Andy says:

        I did solve it. No need to create the directory it is already there, the file path displays differently on the PC. Just put them in the DroidPlanner/Maps directory that is already there and you should be good to go.

        • traveller says:

          Hi Andy:
          Thanks for your response. I had been trying to use Google Hybrid maps but that doesn’t seem to work.
          Using Google Satellite maps seems to have resolved the problem. Have you found this to be the case also?

  5. David Pulvermacher says:

    Hi Traveller….
    I have just been fiddling again. I made the error of putting my first map into a directory of it’s own in …/storage/emulated/0/DroidPlanner/Maps.
    I’ve just copied the files into the …/storage/emulated/0/DroidPlanner/Maps folder and it all works fine now.
    Interestingly my version of Mission Planner on the PC won’t show Google satelite maps, so I used Bing to generate the tiles for the zip file. The resolution when viewed in Tower isn’t as good as the Google version…
    I wonder why? Best DP.

  6. traveller says:

    OK, I’ve successfully been able to use an offline. I had been trying to use Google Hybrid maps but never succeeded. I then tried Google Maps and that worked.

    Now I have a question: If I want to have access to two maps of two or more different geographical areas, do I need to put them in separate folders or do they all get “merged” into existing folders (ie, zoom levels 1 – 18 or so) and the map read program is smart enough to pick out the right files?

    • David Pulvermacher says:

      I tried putting the tile files in a directory in…\maps, but Tower doesn’t seem to be able to recognise the map in the directory. Seems that the files have to be in their original form when unzipped into …\maps.
      I guess the solution is to make a separate directory somewhere else and to copy and paste into …\maps as needed for different locations. Pretty clumsy!
      Maybe I’m just missing something (stupid?)…help APM!!