MCPcopy Create free account
hub / github.com/protomaps/PMTiles / constructor

Method constructor

js/src/adapters.ts:187–191  ·  view source on GitHub ↗

* Initialize the MapLibre PMTiles protocol. * * * metadata: also load the metadata section of the PMTiles. required for some "inspect" functionality * and to automatically populate the map attribution. Requires an extra HTTP request. * * errorOnMissingTile: When a vector MVT tile is miss

(options?: { metadata?: boolean; errorOnMissingTile?: boolean })

Source from the content-addressed store, hash-verified

185 * which some applications depend on when overzooming.
186 */
187 constructor(options?: { metadata?: boolean; errorOnMissingTile?: boolean }) {
188 this.tiles = new Map<string, PMTiles>();
189 this.metadata = options?.metadata || false;
190 this.errorOnMissingTile = options?.errorOnMissingTile || false;
191 }
192
193 /**
194 * Add a {@link PMTiles} instance to the global protocol instance.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected