diff --git a/js/CHANGELOG.md b/js/CHANGELOG.md index 0522d5c..bd4d7b5 100644 --- a/js/CHANGELOG.md +++ b/js/CHANGELOG.md @@ -1,3 +1,6 @@ +3.0.4 +* export DecompressFunc type + 3.0.3 * Deprecate `prefetch`-ing the first 16 kb as an option, always true diff --git a/js/adapters.ts b/js/adapters.ts index 96b3bc5..f18f2fc 100644 --- a/js/adapters.ts +++ b/js/adapters.ts @@ -15,6 +15,11 @@ interface DocumentLike { // biome-ignore lint: we don't want to bring in the entire document type type DoneCallback = (error?: Error, tile?: any) => void; +/** + * Add a raster PMTiles as a layer to a Leaflet map. + * + * For vector tiles see https://github.com/protomaps/protomaps-leaflet + */ export const leafletRasterLayer = (source: PMTiles, options: unknown) => { let loaded = false; let mimeType = ""; @@ -155,6 +160,9 @@ const v3compat = return { cancel: () => abortController.abort() }; }; +/** + * MapLibre GL JS protocol. Must be added once globally. + */ export class Protocol { tiles: Map; diff --git a/js/examples/leaflet.html b/js/examples/leaflet.html index 148ee43..594b59f 100644 --- a/js/examples/leaflet.html +++ b/js/examples/leaflet.html @@ -4,7 +4,7 @@ - +