leaflet – How to Cache Google Map for Offline Use in Leaflet

cachegoogle mapsleafletoffline

I am having an hybrid application where I am showing google map as base map with the help of Leaflet.GridLayer.GoogleMutant plugin in leaflet.

Now I need to cache the browsed base map tiles and show in offline mode. I have gone through few offline plugins from leaflet but they are compatible with TileLayer and the base map url (mostly OSM map). Please suggest some ways to cache google base map.

Best Answer

Google's terms of service restrict you from caching Google Map tiles:

No Caching. Customer will not cache Google Maps Content except as expressly permitted under the Maps Service Specific Terms.

See Google Maps Platform Terms of Service.