my current project is about an app and a GoogleMap that supports to be completely offline.
Long story short:
Problem:
My GoogleMap remains completely grey until it has at least ONCE an online connection. Once I got the connection my overlay+mapmarkers become visible. After this my map works totally fine offline.
Question:
How can I make my map (overlay+markers, nothing more...) work without ANY online connection? Furthermore: I didn't find any docs saying that there is a behaviour/activation like this...
.
edit: I don't need any offline map material (I have an overlay!) and switching to another map api may unfortunately not be an option.
If your app needs to access the user's location, you must request permission by adding the relevant Android location permissions to your app. Android offers two location permissions: ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION . The permission you choose determines the accuracy of the location returned by the API.
There is not much official information about this, but there are a couple of interesting threads on the Google Maps API bug reports and feature requests forum thread:
(...) There is still a requirement for an internet connection when the application is first loaded but there is no longer an issue with later opening the application and using the map while there is no connection.
Currently, you need an internet connection on the first activity launch to even enable offline functionality on the Map fragment. Is it possible to allow loading of tiles using an offline tile provider without doing the initial API key check esp. when the map type is GoogleMap.MAP_TYPE_NONE? I think the API key check should really be limited to cases where map type is anything besides MAP_TYPE_NONE.
So, based on the existing information (or lack of it), an Internet connection is required when the application is first loaded to check the API key. After that, the application will work completely offline.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With