nicecode-v2/packages/map/es/interface.d.ts

21 lines
610 B
TypeScript

import { CSSProperties } from "react";
import { MapRef, MapStyle } from "react-map-gl";
export interface MapProps {
onLoad?: (e: mapboxgl.MapboxEvent<undefined>) => void;
mapRef?: React.MutableRefObject<MapRef | undefined>;
style?: CSSProperties;
children?: JSX.Element | JSX.Element[] | Array<JSX.Element | undefined>;
mapConfig?: MapConfigProps;
mapCenter: {
longitude: number;
latitude: number;
};
}
export interface MapConfigProps {
mapboxAccessToken?: string;
minZoom?: number;
maxZoom?: number;
dragRotate?: boolean;
mapStyle?: MapStyle;
}