UNPKG

@deck.gl/carto

Version:

CARTO official integration with Deck.gl. Build geospatial applications using CARTO and Deck.gl.

33 lines 1.1 kB
// deck.gl // SPDX-License-Identifier: MIT // Copyright (c) vis.gl contributors import { TileReader } from "./carto-properties-tile.js"; import { parsePbf } from "./tile-loader-utils.js"; import { getWorkerUrl } from "../../utils.js"; const VERSION = typeof "9.2.6" !== 'undefined' ? "9.2.6" : 'latest'; const id = 'cartoPropertiesTile'; const DEFAULT_OPTIONS = { cartoPropertiesTile: { workerUrl: getWorkerUrl(id, VERSION) } }; const CartoPropertiesTileLoader = { name: 'CARTO Properties Tile', version: VERSION, id, module: 'carto', extensions: ['pbf'], mimeTypes: ['application/vnd.carto-properties-tile'], category: 'geometry', worker: true, parse: async (arrayBuffer, options) => parseCartoPropertiesTile(arrayBuffer, options), parseSync: parseCartoPropertiesTile, options: DEFAULT_OPTIONS }; function parseCartoPropertiesTile(arrayBuffer, options) { if (!arrayBuffer) return null; return parsePbf(arrayBuffer, TileReader); } export default CartoPropertiesTileLoader; //# sourceMappingURL=carto-properties-tile-loader.js.map