diff --git a/types/react-map-gl/index.d.ts b/types/react-map-gl/index.d.ts index 23b723a594..e0b25765de 100644 --- a/types/react-map-gl/index.d.ts +++ b/types/react-map-gl/index.d.ts @@ -317,6 +317,18 @@ export interface FullscreenControlProps extends BaseControlProps { export class FullscreenControl extends BaseControl {} +export interface GeolocateControlProps extends BaseControlProps { + className?: string; + positionOptions?: MapboxGL.PositionOptions; + fitBoundsOptions?: MapboxGL.FitBoundsOptions; + trackUserLocation?: boolean; + showUserLocation?: boolean; + onViewStateChange?: (info: ViewStateChangeInfo) => void; + onViewportChange?: (viewState: ViewState) => void; +} + +export class GeolocateControl extends BaseControl {} + export interface DraggableControlProps extends BaseControlProps { draggable?: boolean; onDrag?: (event: DragEvent) => void; diff --git a/types/react-map-gl/react-map-gl-tests.tsx b/types/react-map-gl/react-map-gl-tests.tsx index 6740ad0eb4..17179fb0d6 100644 --- a/types/react-map-gl/react-map-gl-tests.tsx +++ b/types/react-map-gl/react-map-gl-tests.tsx @@ -6,6 +6,7 @@ import { SVGOverlay, HTMLOverlay, FullscreenControl, + GeolocateControl, CanvasRedrawOptions, HTMLRedrawOptions, SVGRedrawOptions, @@ -39,6 +40,7 @@ class MyMap extends React.Component<{}, State> { ref={this.setRefInteractive} > + { const {