MCPcopy
hub / github.com/protomaps/PMTiles / add

Method add

js/src/adapters.ts:199–201  ·  view source on GitHub ↗

* Add a PMTiles instance to the global protocol instance. * * For remote fetch sources, references in MapLibre styles like pmtiles://http://... * will resolve to the same instance if the URLs match.

(p: PMTiles)

Source from the content-addressed store, hash-verified

197 * will resolve to the same instance if the URLs match.
198 */
199 add(p: PMTiles) {
200 this.tiles.set(p.source.getKey(), p);
201 }
202
203 /**
204 * Fetch a {@link PMTiles} instance by URL, for remote PMTiles instances.

Callers 3

pmtilesFunction · 0.80
adapter.test.tsFile · 0.80
addTilesetFunction · 0.80

Calls 1

getKeyMethod · 0.45

Tested by

no test coverage detected