Maptiles provider problems

I’m using Tower version 4.0 on a Nexus 7/Android 6.0.0 and am having problems with map tiles. I have it set up to use Mapbox as my map tiles provider. (It’s my understanding that’s what I need to do in order to access my maps offline.) And the first time, it works. But as soon as I navigate away from the main display and then navigate back, the Mapbox tiles are replaced by Google map tiles.

Does anyone have any ideas about what could be going on here?

Steps to reproduce:

  1. In my Mapbox account, I use their satellites-with-street-names style, and have my mapbox id and access token set in Tower. And the first time I do that, I get the Mapbox tiles. I can simulate the initial state by changing my mapbox id to something invalid. When I go back to the main display, I’ll see an error message complaining about my invalid credentials. Then I go back to Settings and fix my mapbox id, and then go back to the main display.

  2. So I’m back at my display page and I see exactly the satellite-with-street-names style I confgured. So I’m using my Mapbox tiles - awesome!

  3. Now I go to the Settings page and flip back, or maybe open another application and then go back to Tower. And my beautiful Mapbox tiles are gone, replaced by the generic Google street tiles.

TIA,
-Polly

Whenever I wanted to use offline map tiles, that wasn’t the process. I think you’ll have to setup for Google Maps and there’s a way to prefetch the files in MP, then you have to transfer those from MP on your PC or whatever to the tablet. It’s a convoluted process for sure.

Yes, I’ve seen the transfer-files method before, and I may go back to that if I can’t figure out where I’m going wrong.
In this case, I’m trying to use Tower without the transfer method, using the instructions here: https://github.com/DroidPlanner/Tower/wiki/Offline-Maps. Offline maps have been supported in this way since Tower version 3.2.

I suspect the issue has something to do with the fact that mapbox has recently changed their system. There is still an access token but there no longer mapbox ID. As such I am unable to access any mapbox maps from tower.

@pollyp, @toasthall If mapbox has changed their system, there’s little we can do. In the meantime though, @pollyp can you report the issue on the Tower issues tracker page @ https://github.com/DroidPlanner/Tower/issues.
Please include as much information as possible to help us reproduce the issue, screenshots would be great as well!

@toasthall @ne0fhyk Thanks for your responses.

I don’t think it’s a Mapbox issue, since I do see the tiles at least some of the time. If they were just cutting off dev access, you’d think it would fail 100% of the time. And that’s consistent with my read of their material: Mapbox isn’t making existing IDs or data go away; they’re freezing access to the old tools used for map creation and forcing users to migrate to their new tools for map creation. (And if someone has more information or a correction to my read of the situation with Mapbox, I’d love to hear it.)

I’ve got two updates: while I have problems with consistent Mapbox tiles on my vehicle data view, I can reload them by switching to the editor or vehicle history page. And when I took my Nexus off network (and didn’t switch apps), I did have access to my Mapbox tiles. Yay!

I’ll file a bug report. Thanks for the link.

Why are you using mapbox? Just download google offline maps and select this in Tower.
You even can save them to your sd card.

1 Like

They maybe using their own maps, as an obvious reason. But thanks for tip, I’m sure that useful for people. :thumbsup:

@Bas_Hamans I’d be happy to to use Google’s maps in offline mode for Tower. But I’m having problems doing that. Can you point out where I’m going wrong?

  1. When I have a network connection, I pull up the Google Maps application on my Nexus 7 and add a new region to my offline maps section. I wait until it has downloaded.
  2. I turn off my network connection, and go back to Google Maps and drill down into my new region to make sure the maps are indeed offline.
  3. Now I go to Tower. Google maps is already my maps provider. I go to maps tiles provider, and change it from Mapbox to Google.
  4. Now I try to navigate to the new region … but I don’t have the Google offline maps and I can’t drill down. :frowning:
  5. I turn the network back on, and now I can see Google maps in Tower

So it seems that just downloading offline maps within the Google Maps application isn’t enough to make them visible within Tower. What do I need to do?

I’ve just done some checking and Google Maps API for Android will allow you to show your own map tiles, but it does not allow you to cache google map tiles ‘automatically’

“Map Providers” please select “Google map”
“Map Provider Preferences” please select “Map tile Provider” and select “Google”
please select “Tile Provider Preferences” and select “map type” -> “normal”

If you have selected “Satellite”, “Hybrid” or Terrain” it won’t work!

@Bas_Hamans: Hi, sorry for the late reply – holiday distractions!

I tried your instructions, but am still having problems accessing Google standard map tiles offline in Tower. Here’s exactly what I did:

  1. I go to Tower and configure it as specified: Settings -> User interface -> Maps Providers = google map; Map provider preferences -> Map Tile provider = google; Tile provider preferences -> Map type = normal.

  2. When I have a network connection, I pull up the Google Maps application, set the maps to “standard” (not satellite etc) and add a new region to my offline maps section. To make sure that I am not getting hung up with cached tiles, I picked a new area, downtown Boston in the U.S. Here is what I see in Google Maps:

I wait until Google Maps has loaded the map for offline use.

  1. I turn off my network connection, and go to Tower. Now I try to navigate to Boston … but I just see the very high level view. The Google Maps offline maps aren’t there:

  1. I turn the network back on, and now I can see Google maps for Boston in Tower:

Should this be a bug report? Or am I missing something?

Thanks in advance for your help!

Unless they’ve changed something in tower, getting offline tiles to Tower is not quite that easy.

I know the only way it would work for me is I would have to cache map tiles in Mission Planner under Map Tool > Prefetch in the Flight Plan screen. From that, you’ll have to choose sections you want to prefetch.

You can use this as a guide. It uses Google Maps.

@BigTulsa Thanks for the pointer. In my version of Tower (4.0), though, there is no “use offline maps” option as described in Figure 8 for Google Maps. I noticed that the post is dated September 2014 – perhaps the code changed in the interim?

Just to be clear, I do have a perfectly serviceable workaround now to using offline map tiles from Map Box, so I’m happy.

If there are outstanding issues, it’s (1) that it’s not clear how to use offline Mapbox tiles if you don’t have a legacy developer ID to use, since MapBox has completely changed their developer interface, and (2) getting special tiles (eg Satellite tiles) to show up in Tower requires a few extra steps. I have a bug report in for (2). If someone wants to enlighten us about (1), if you put the information in this thread I’ll write it up and get it added to the Wiki.

“Map Providers” please select “Google map”

“Map Provider Preferences” please select “Map tile Provider” and select “Google”

                                                                   Please select “Tile Provider Preferences” and select “map type” -> “normal”

If you have selected “Satellite”, “Hybrid” or Terrain” it won’t work!

Van: pollyp [mailto:noreply@discuss.ardupilot.org]
Verzonden: maandag 21 november 2016 04:06
Aan: bhamans@upcmail.nl
Onderwerp: [ArduPilot Discuss] [Ground Control Software/Tower] Maptiles provider problems

http://discuss.ardupilot.org/letter_avatar_proxy/v2/letter/p/e9a140/45.png

http://discuss.ardupilot.org/users/pollyp pollyp
November 21

http://discuss.ardupilot.org/users/bas_hamans @Bas_Hamans I’d be happy to to use Google’s maps in offline mode for Tower. But I’m having problems doing that. Can you point out where I’m going wrong?

  1. When I have a network connection, I pull up the Google Maps application on my Nexus 7 and add a new region to my offline maps section. I wait until it has downloaded.
  2. I turn off my network connection, and go back to Google Maps and drill down into my new region to make sure the maps are indeed offline.
  3. Now I go to Tower. Google maps is already my maps provider. I go to maps tiles provider, and change it from Mapbox to Google.
  4. Now I try to navigate to the new region … but I don’t have the Google offline maps and I can’t drill down. http://discuss.ardupilot.org/images/emoji/emoji_one/frowning.png?v=3
  5. I turn the network back on, and now I can see Google maps in Tower

So it seems that just downloading offline maps within the Google Maps application isn’t enough to make them visible within Tower. What do I need to do?

Hi,

using Tower-v4.0.0:
User Interface --> Map Provider Preferences --> Tile Provider Preferences:
check 'Enable offline map layer’
check Add ‘Download Map’ to menu
set Mapbox Id : mapbox.satellite (or choose another)
set Mapbox Access Token: enter the ‘Default Public Token’ in ‘API access token’ of your Mapbox account
User Interface --> Map Provider Preferences --> Map Tile Provider: Mapbox

I can use the satellite images. If they are replaced by the generic Google street tiles I can get them back using Editor or Vehicle History.

Does anybody know where the images are stored ?