Skip to content
Discussion options

You must be logged in to vote

chatgpt, of all "people" recommends this work around, lets see :)

import { PMTiles, ResolvedValueCache } from 'pmtiles'

// 1. Create a "file://" Source (so PMTiles uses local disk I/O)
const source = await new FileSource(path)) (see above)

// 2. Make a cache that never shares promises and doesn’t pre-fetch
// - maxCacheEntries = 0 (no entries retained)
// - prefetch = false
const cache = new ResolvedValueCache(0, false)

// 3. Hand that cache to PMTiles
const pm = new PMTiles(source, cache)

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by amdevelopment-world
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant