blob: 64c54732f2f87f3457e0e602ed17cb2ef22dfa23 [file] [log] [blame]
// eslint-disable-next-line import/no-unresolved
import type { Topology } from 'topojson-specification';
import type { FeatureCollection } from 'geojson';
import type Projection from './chart/Projection';
interface BaseMapMetadata {
key: string;
name: string;
keyField: string;
projection?: Projection;
rotate?: [number, number] | [number, number, number];
}
interface TopojsonMapMetadata extends BaseMapMetadata {
type: 'topojson';
load: () => Promise<Topology>;
}
interface GeojsonMapMetadata extends BaseMapMetadata {
type: 'geojson';
load: () => Promise<FeatureCollection>;
}
export type RawMapMetadata = TopojsonMapMetadata | GeojsonMapMetadata;