UNPKG

japan-map-selector

Version:

Interactive Japan map component for selecting prefectures and municipalities

45 lines (44 loc) 1.3 kB
import type { GeoJSONFeature } from '../types'; export interface PrefectureDataIndex { prefectures: { [code: string]: { name: string; municipalityCount: number; files: { [precision: string]: { path: string; size: number; features: number; }; }; }; }; generated: string; totalSize: { original: number; compressed: number; }; } export declare class DynamicDataLoader { private baseUrl; private cache; private index?; private currentPrecision; constructor(baseUrl?: string); loadIndex(): Promise<void>; setPrecision(precision: string): void; isPrefectureAvailable(prefectureCode: string): Promise<boolean>; loadMunicipalitiesForPrefecture(prefectureCode: string): Promise<GeoJSONFeature[]>; loadMunicipalitiesForPrefectures(prefectureCodes: string[]): Promise<GeoJSONFeature[]>; clearCache(prefectureCode?: string): void; getCacheInfo(): { count: number; prefectures: string[]; }; getDataSizeInfo(prefectureCode: string): Promise<{ name: string; sizes: { [precision: string]: number; }; } | null>; }