-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
699dae8
commit a6404d3
Showing
7 changed files
with
47 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { ViewportProps } from 'react-map-gl'; | ||
|
||
import { InteractiveMapProps } from 'react-map-gl/src/components/interactive-map'; | ||
|
||
export interface MapProps extends InteractiveMapProps { | ||
// /** A function that returns the map instance */ | ||
children?: (map: any) => React.ReactNode; | ||
|
||
/** Custom css class for styling */ | ||
className?: string; | ||
|
||
/** An object that defines the viewport | ||
* @see https://uber.github.io/react-map-gl/#/Documentation/api-reference/interactive-map?section=initialization | ||
*/ | ||
viewport?: Partial<ViewportProps>; | ||
|
||
/** An object that defines the bounds */ | ||
bounds?: { | ||
bbox: number[]; | ||
options?: {}; | ||
viewportOptions?: Partial<ViewportProps>; | ||
}; | ||
|
||
screenshot?: boolean; | ||
|
||
/** A function that exposes when the map is mounted. | ||
* It receives and object with the `mapRef` and `mapContainerRef` reference. */ | ||
onMapReady?: ({ map, mapContainer }) => void; | ||
|
||
/** A function that exposes when the map is loaded. | ||
* It receives and object with the `mapRef` and `mapContainerRef` reference. */ | ||
onMapLoad?: ({ map, mapContainer }) => void; | ||
|
||
/** A function that exposes the viewport */ | ||
onMapViewportChange?: (viewport: Partial<ViewportProps>) => void; | ||
|
||
/** A function that exposes if current tiles on the viewport are loaded */ | ||
onMapTilesLoaded?: (loaded: boolean) => void; | ||
} |