{"id":32231997,"url":"https://github.com/mazemap/leaflet.tilelayer.pouchdbcached","last_synced_at":"2025-10-22T11:51:15.450Z","repository":{"id":27874090,"uuid":"31365141","full_name":"MazeMap/Leaflet.TileLayer.PouchDBCached","owner":"MazeMap","description":"A Leaflet tile layer which caches into PouchDB for offline use","archived":true,"fork":false,"pushed_at":"2024-11-21T14:53:26.000Z","size":74,"stargazers_count":208,"open_issues_count":29,"forks_count":67,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-10-19T06:34:19.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MazeMap.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-02-26T12:05:04.000Z","updated_at":"2025-04-08T11:57:39.000Z","dependencies_parsed_at":"2025-07-18T05:56:43.043Z","dependency_job_id":"b534e6b8-6dc8-49d0-ade8-d0df09450b50","html_url":"https://github.com/MazeMap/Leaflet.TileLayer.PouchDBCached","commit_stats":{"total_commits":26,"total_committers":9,"mean_commits":2.888888888888889,"dds":0.5769230769230769,"last_synced_commit":"179c3ce921c04cb989e5cb42288539dbdafc4400"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MazeMap/Leaflet.TileLayer.PouchDBCached","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MazeMap%2FLeaflet.TileLayer.PouchDBCached","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MazeMap%2FLeaflet.TileLayer.PouchDBCached/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MazeMap%2FLeaflet.TileLayer.PouchDBCached/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MazeMap%2FLeaflet.TileLayer.PouchDBCached/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MazeMap","download_url":"https://codeload.github.com/MazeMap/Leaflet.TileLayer.PouchDBCached/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MazeMap%2FLeaflet.TileLayer.PouchDBCached/sbom","scorecard":{"id":92093,"data":{"date":"2025-08-11","repo":{"name":"github.com/MazeMap/Leaflet.TileLayer.PouchDBCached","commit":"c649928793023d5f39809fd32ca957f81c3aebf6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":3,"reason":"Found 7/21 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Info: FSF or OSI recognized license: MIT License: COPYING:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T08:07:01.399Z","repository_id":27874090,"created_at":"2025-08-15T08:07:01.399Z","updated_at":"2025-08-15T08:07:01.399Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280431497,"owners_count":26329786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-22T11:51:10.108Z","updated_at":"2025-10-22T11:51:15.441Z","avatar_url":"https://github.com/MazeMap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deprecated\n\nThis repository is no longer maintained and is deprecated. Please be aware that it may not work with the latest versions of its dependencies.\n\n---\n\nAllows all Leaflet TileLayers to cache into PouchDB for offline use, in a transparent fashion.\n\nThere is a [demo](http://mazemap.github.io/Leaflet.TileLayer.PouchDBCached/demo.html) available, which shows cache hits/misses/seeds in the browser's developer console.\n\n# Dependencies\n\nTested with Leaflet 1.4.0 and PouchDB 7.0.0.\n\nYou probably want to load Leaflet, PouchDB and Leaflet.TileLayer.PouchDB like so:\n\n```html\n\t\u003cscript src=\"https://unpkg.com/leaflet@^1.0.0/dist/leaflet-src.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"https://unpkg.com/pouchdb@^5.2.0/dist/pouchdb.js\"\u003e\u003c/script\u003e\n\t\u003cscript src=\"https://unpkg.com/leaflet.tilelayer.pouchdbcached@latest/L.TileLayer.PouchDBCached.js\"\u003e\u003c/script\u003e\n```\n\nIf you are still using Leaflet 0.7.x, the latest compatible release is [v0.1.0](https://github.com/MazeMap/Leaflet.TileLayer.PouchDBCached/releases/tag/v0.1.0).\n\n\n# Usage\n\nThe plugin modifies the core `L.TileLayer` class, so it should be possible to cache any tile layer.\n\nTo use, add the option `useCache` with a value of `true` when instantiating your layer. You probably want to use Leaflet's `crossOrigin` option, like so:\n\n```javascript\nvar layer = L.tileLayer('https://whatever/{z}/{x}/{y}.png', {\n\tmaxZoom: 18,\n\n\tuseCache: true,\n\tcrossOrigin: true\n});\n```\n\nOptions available are as follows:\n\n* `useCache`: set to true in order to enable the cache. This option must be set at initialization time.\n* `saveToCache`: Whether to save new tiles to the cache or not. Defaults to true.\n* `useOnlyCache`: Whether to fetch tiles from the network or not. Defaults to false.\n* `cacheMaxAge`: Time, in milliseconds, for any given tile to be considered 'fresh'. Tiles older than this value will be re-requested from the network. Defaults to 24 hours.\n* `cacheURLMask`: A regular expresstion to mask the URL so that access tokens and the sort won't cause cache misses. (e.g. /access_token=[^\u0026]*/)\n\nNew functions available are as follows:\n* `seed`: Starts seeding the cache for a given bounding box (a `L.LatLngBounds`), and between the two given zoom levels.\n\nNew events available are as follows:\n\n* `tilecachehit`: Fired when a tile has been found in the tile cache. The event includes data as per http://leafletjs.com/reference.html#tile-event\n* `tilecachemiss`: Like `tilecachehit`, but is fired when the tile has *not* been found in the cache.\n* `tilecacheerror`: Fired when there was an error trying to save a tile in the cache. The event data includes:\n * `tile`: A reference to the failed tile\n * `error`: The error message, probably related to CORS.\n* `seedstart`: Fired when a layer cache has started seeding. The event data includes:\n * `bbox`: bounding box for the seed operation, as per the `L.TileLayer.seed()` function call.\n * `minZoom` and `maxZoom`: zoom levels the seed operation, as per the `L.TileLayer.seed()` function call.\n * `queueLength`: (integer) Total number of tiles to be loaded during the seed operation.\n* `seedend`: Fired when a layer cache has finished seeding.\n* `seedprogress`: Fired every time a tile is cached during a seed operation\n * `remainingLength`: (integer) How many tiles are left in the seed queue. Starts with a value of `queueLength` and drops down to zero.\n\n\n# Cross-Origin Resource Sharing\n\nDue to the tile images being parsed and stored by the browser (technically, extracting data from a canvas in which a external image has been loaded into), the tiles must come from a tile server which allows CORS (Cross-Origin Resource Sharing) on the tiles. So tiles must have a CORS header allowing them to be loaded in the document where you're using this caching layer.\n\nIn other words: if chrome shows a grey map, and displays CORS-related messages in the console, make sure that your tileserver adds this header to all tiles:\n\n`Access-Control-Allow-Origin: *`\n\n\n# Underlying cache structure\n\nThis plugin uses an instance of PouchDB, named `offline-tiles`. PouchDB is a key-value store, so the key is the URL of a tile, and the value is a plain object containing a timestamp and the base64-encoded image.\n\n\n# License and stuff\n\nUnder MIT license.\n\nHeavily inspired by https://github.com/tbicr/OfflineMap\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazemap%2Fleaflet.tilelayer.pouchdbcached","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazemap%2Fleaflet.tilelayer.pouchdbcached","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazemap%2Fleaflet.tilelayer.pouchdbcached/lists"}