UNPKG

882 BTypeScriptView Raw
1import * as React from 'react';
2import { Map, GeoJSONSource, GeoJSONSourceRaw, Layer } from 'mapbox-gl';
3import { TilesJson } from './util/types';
4export interface Props {
5 id: string;
6 geoJsonSource?: GeoJSONSourceRaw;
7 tileJsonSource?: TilesJson;
8 map: Map;
9 onSourceAdded?: (source: GeoJSONSource | TilesJson) => void;
10 onSourceLoaded?: (source: GeoJSONSource | TilesJson) => void;
11}
12export declare type LayerWithBefore = Layer & {
13 before?: string;
14};
15export declare class Source extends React.Component<Props> {
16 private id;
17 private onStyleDataChange;
18 componentDidMount(): void;
19 private initialize;
20 private onData;
21 removeSource(): LayerWithBefore[];
22 componentWillUnmount(): void;
23 componentDidUpdate(prevProps: Props): void;
24 render(): null;
25}
26declare const _default: <T>(props: T) => JSX.Element;
27export default _default;