Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

add dbOptions to TileLayer for PouchDB options #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions L.TileLayer.PouchDBCached.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ L.TileLayer.addInitHook(function() {
this._canvas = null;
return;
}

this._db = new PouchDB('offline-tiles');
if (this.options.dbOptions){
this._db = new PouchDB('offline-tiles',this.options.dbOptions);
}else{
this._db = new PouchDB('offline-tiles');
}
this._canvas = document.createElement('canvas');

if (!(this._canvas.getContext && this._canvas.getContext('2d'))) {
Expand Down