[](http://npm.im/react-leaflet-pouchdb-tilelayer)
npm install react-leaflet-pouchdb-tilelayer




React version of Leaflet.TileLayer.PouchDBCached
``bash`
npm i react-leaflet-pouchdb-tilelayer --save`
ORbash`
npm i react-leaflet-pouchdb-tilelayer@3.2.2-beta --save
https://codesandbox.io/p/sandbox/strange-field-t7l4ly
This plugin is compatible with version 2 of React-Leaflet
`javascript
import { Map, TileLayer, LayersControl } from "react-leaflet";
import PouchDBTileLayer from "react-leaflet-pouchdb-tilelayer";
;
`
{ useCache: true }
Enable the cache logic
{ saveToCache: true }
Save the map tile to PouchDB
{ useOnlyCache: false }
Load from PouchDB cache and do not download from web
{ cacheFormat: 'image/png' }
The mine type
{ cacheMaxAge: 3600000 }
cache age in millisecond unit
{ cacheNextZoomLevel: true }
pre-load and cache the next level tile
npm install`
3. Run `npm run build``