1 | import * as React from 'react';
|
2 | import { Map, GeoJSONSource, GeoJSONSourceRaw, Layer } from 'mapbox-gl';
|
3 | import { TilesJson } from './util/types';
|
4 | export 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 | }
|
12 | export declare type LayerWithBefore = Layer & {
|
13 | before?: string;
|
14 | };
|
15 | export 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 | }
|
26 | declare const _default: <T>(props: T) => JSX.Element;
|
27 | export default _default;
|