@pansy/react-mapbox-gl
Version:
🌍 基于 Mapbox GL 封装的 React 组件库
21 lines (20 loc) • 483 B
TypeScript
import type { AnyLayer } from 'mapbox-gl';
import type { OptionalId, OptionalSource } from '../../types';
export interface LayerType {
id: string;
type: string;
metadata?: any;
source?: unknown;
minzoom?: number;
maxzoom?: number;
filter?: any;
layout?: {
[property: string]: any;
};
paint?: {
[property: string]: any;
};
}
export type LayerProps<L = AnyLayer> = OptionalSource<OptionalId<L>> & {
beforeId?: string;
};