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

Method getVectorEncoding

app/src/tileset.ts:219–226  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217 }
218
219 async getVectorEncoding() {
220 const resp = await fetch(this.url);
221 const j = await resp.json();
222 const template = j.tiles[0];
223 const pathname = new URL(template).pathname;
224 if (pathname.endsWith(".mlt")) return "mlt";
225 return "mvt";
226 }
227}
228
229// from a input box or a URL param state.

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected