@mappedin/mvf-fetch
v3.0.0-beta.15
Published
Isomorphic utilities for efficiently reading published MVF v2/v3 zip archives from the cloud via HTTP Range requests.
Readme
MVF Fetch
Isomorphic utilities for efficiently reading published MVF v2/v3 zip archives from the cloud via HTTP Range requests.
This package focuses on extracting and optionally validating individual zip entries. It does not render maps or convert between MVF versions.
Usage
import { createMvfFetcher } from '@mappedin/mvf-fetch';
import { autoMvfValidator } from '@mappedin/mvf-fetch/validators';
const fetcher = createMvfFetcher({
url: async () => ({
url: signedZipUrl,
cacheKey: `${venueId}:${updatedAt}`,
}),
validate: autoMvfValidator(),
});
const version = await fetcher.getVersion();
const { files } = await fetcher.getEntries(['manifest.geojson', 'floors.geojson']);