1 | import * as React from 'react';
|
2 | import * as MapboxGL from 'mapbox-gl';
|
3 | export declare type MouseEvent = (evt: any) => any;
|
4 | export interface LineProps {
|
5 | linePaint?: MapboxGL.LinePaint;
|
6 | lineLayout?: MapboxGL.LineLayout;
|
7 | lineOnMouseMove?: MouseEvent;
|
8 | lineOnMouseEnter?: MouseEvent;
|
9 | lineOnMouseLeave?: MouseEvent;
|
10 | lineOnMouseDown?: MouseEvent;
|
11 | lineOnMouseUp?: MouseEvent;
|
12 | lineOnClick?: MouseEvent;
|
13 | }
|
14 | export interface CircleProps {
|
15 | circlePaint?: MapboxGL.CirclePaint;
|
16 | circleLayout?: MapboxGL.CircleLayout;
|
17 | circleOnMouseMove?: MouseEvent;
|
18 | circleOnMouseEnter?: MouseEvent;
|
19 | circleOnMouseLeave?: MouseEvent;
|
20 | circleOnMouseDown?: MouseEvent;
|
21 | circleOnMouseUp?: MouseEvent;
|
22 | circleOnClick?: MouseEvent;
|
23 | }
|
24 | export interface SymbolProps {
|
25 | symbolLayout?: MapboxGL.SymbolLayout;
|
26 | symbolPaint?: MapboxGL.SymbolPaint;
|
27 | symbolOnMouseMove?: MouseEvent;
|
28 | symbolOnMouseEnter?: MouseEvent;
|
29 | symbolOnMouseLeave?: MouseEvent;
|
30 | symbolOnMouseDown?: MouseEvent;
|
31 | symbolOnMouseUp?: MouseEvent;
|
32 | symbolOnClick?: MouseEvent;
|
33 | }
|
34 | export interface FillProps {
|
35 | fillLayout?: MapboxGL.FillLayout;
|
36 | fillPaint?: MapboxGL.FillPaint;
|
37 | fillOnMouseMove?: MouseEvent;
|
38 | fillOnMouseEnter?: MouseEvent;
|
39 | fillOnMouseLeave?: MouseEvent;
|
40 | fillOnMouseDown?: MouseEvent;
|
41 | fillOnMouseUp?: MouseEvent;
|
42 | fillOnClick?: MouseEvent;
|
43 | }
|
44 | export interface FillExtrusionProps {
|
45 | fillExtrusionLayout?: MapboxGL.FillExtrusionLayout;
|
46 | fillExtrusionPaint?: MapboxGL.FillExtrusionPaint;
|
47 | fillExtrusionOnMouseMove?: MouseEvent;
|
48 | fillExtrusionOnMouseEnter?: MouseEvent;
|
49 | fillExtrusionOnMouseLeave?: MouseEvent;
|
50 | fillExtrusionOnMouseDown?: MouseEvent;
|
51 | fillExtrusionOnMouseUp?: MouseEvent;
|
52 | fillExtrusionOnClick?: MouseEvent;
|
53 | }
|
54 | export interface Props extends LineProps, CircleProps, SymbolProps, FillProps, FillExtrusionProps {
|
55 | id?: string;
|
56 | data: GeoJSON.Feature<GeoJSON.Geometry, GeoJSON.GeoJsonProperties> | GeoJSON.FeatureCollection<GeoJSON.Geometry> | string;
|
57 | layerOptions?: MapboxGL.Layer;
|
58 | sourceOptions?: MapboxGL.VectorSource | MapboxGL.RasterSource | MapboxGL.GeoJSONSource | MapboxGL.GeoJSONSourceRaw;
|
59 | before?: string;
|
60 | map: MapboxGL.Map;
|
61 | }
|
62 | export declare class GeoJSONLayer extends React.Component<Props> {
|
63 | private id;
|
64 | private source;
|
65 | private layerIds;
|
66 | private buildLayerId;
|
67 | private createLayer;
|
68 | private mapLayerMouseHandlers;
|
69 | private onStyleDataChange;
|
70 | private initialize;
|
71 | private unbind;
|
72 | componentDidMount(): void;
|
73 | componentWillUnmount(): void;
|
74 | isGeoJSONSource: (source?: MapboxGL.GeoJSONSourceRaw | MapboxGL.VectorSource | MapboxGL.RasterSource | MapboxGL.RasterDemSource | MapboxGL.GeoJSONSource | MapboxGL.VideoSource | MapboxGL.ImageSource | MapboxGL.CanvasSource | undefined) => source is MapboxGL.GeoJSONSource;
|
75 | componentDidUpdate(prevProps: Props): void;
|
76 | render(): null;
|
77 | }
|
78 | declare const _default: <T>(props: T) => JSX.Element;
|
79 | export default _default;
|