@loaders.gl/mvt
Version:
Loader for Mapbox Vector Tiles
15 lines • 506 B
JavaScript
// loaders.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import { fromGeojson } from "./mapbox-vt-pbf/to-vector-tile.js";
export function encodeMVT(data, options) {
const { mvt } = options || {};
const encodeOptions = {
layerName: mvt?.layerName || 'geojsonLayer',
version: mvt?.version || 1,
extent: mvt?.extent || 4096,
tileIndex: mvt?.tileIndex
};
return fromGeojson(data, encodeOptions);
}
//# sourceMappingURL=encode-mvt.js.map