Google Map Offline - Tuong-Nguyen/PreparationEduLog GitHub Wiki
It seems that Google does not allow us to download the map for offline usage.
One possible way is to use TileProvider but we need to build them for usage:
https://stackoverflow.com/questions/14784841/tileprovider-using-local-tiles
https://stackoverflow.com/questions/39203151/how-to-show-google-map-offline
osmdroid is a (almost) full/free replacement for Android's MapView (v1 API) class. It also includes a modular tile provider system with support for numerous online and offline tile sources and overlay support with built-in overlays for plotting icons, tracking location, and drawing shapes.
But don't worry! Google Maps automatically cache map images at each zoom levels of visited location for offline usage. If there are no internet connection, those images will be used so that our app can function normally.
If we go to a position which wasn't visited before, a blank portion will be displayed instead. To avoid that, we can use custom TileProvider to draw overlay map.
- To determining which tiles will be used at a specified position, we can apply the technique as being discussed here: https://developers.google.com/maps/documentation/javascript/maptypes#WorldCoordinates
- Download tiles from Google service:
http://mt1.google.com/vt/lyrs={map_type}&x={latitude}&y={longitude}&z={zoom_level}
, ex: http://mt1.google.com/vt/lyrs=m&x=1325&y=3143&z=13