-
What is the best way to use PMTiles for an offline map? Ideally, I would like to have a single html file with all the javascript embedded and maybe the pmtiles file could be base64 encoded and stored as a string in javascript or so. Do you think that is possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Run a local HTTP server. The other option is to use the The base64 idea could also work but seems like it would be pretty ugly after a few megabytes. You'd have to write a new class implementing the |
Beta Was this translation helpful? Give feedback.
Run a local HTTP server.
The other option is to use the
file://
protocol, but this requires user interaction to access the filesystem for security reasons.The base64 idea could also work but seems like it would be pretty ugly after a few megabytes. You'd have to write a new class implementing the
Source
interface that is backed by a simple ArrayBuffer loaded from the base64 string.