Does Android GoogleMap need activation?

My current project talks about the app and GoogleMap, which supports fully offline mode.

In short:

  • I am using MapFragment with com.google.android.gms.maps.GoogleMap
  • and also have standalone overlayDrawable and markers
  • see http://codemax.de/upl/offline_map.png
  • I really don't need google maps, just mapView

Problem:

My GoogleMap remains completely gray until it has at least ONCE an online connection. As soon as I get the connection, my overlays + markers become visible. After that, my card works completely offline.

Question:

How can I make my card (overlay + markers, no more ...) work without ANY online connection? Also: I have not found a single document saying that there is behavior / activation like this ...

.

edit: I don’t need any offline map file (I have an overlay!), and switching to another api map may, unfortunately, not be an option.

+6
source share
3 answers

There is no official information about this, but there are some interesting topics in the error reports of the Google Maps API and in the task section:

  • Problem 5017 (Status: Fixed) solves the problem of loading a card every time the device is turned off, but with the following note:

(...) There is still a requirement for connecting to the Internet when the application is downloaded first, but there is no longer a problem with the subsequent opening of the application and using the card until there is no connection.

  • Issue 5496 (Status: New ) was published on June 12, 2013 and has not yet been resolved:

Currently, you need an Internet connection the first time you start an activity to enable offline functionality on a map fragment. Is it possible to enable tile downloads using an offline tile provider without performing an initial esp API key check. when is the map type GoogleMap.MAP_TYPE_NONE? I think that API key validation should really be limited to cases where the map type is something other than MAP_TYPE_NONE.

Thus, based on existing information (or lack thereof), an Internet connection is required when the application is first downloaded to verify the API key. After that, the application will work completely autonomously.

+2
source

Have you tried setting the GoogleMap type to NONE?

myMap.setMapType(GoogleMap.MAP_TYPE_NONE); 

https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.html#setMapType(int) https://developers.google.com/android/reference/com/google/ android / gms / maps / GoogleMap.html # MAP_TYPE_NONE

I'm not sure, but it's easy to try. In any case, as far as I know, you must provide a valid api key to use the GoogleMaps API, and it may happen that you need the first connection to verify this key ...

0
source

As far as I know, the Google map will not work without a connection, it will be needed, at least to verify the application api key

0
source

All Articles