import { GlobalProps } from '../../shared/global'; import { SizingProps } from '../../shared/box'; export interface MapProps extends GlobalProps, SizingProps { /** * A valid API key for the map service provider. * * The map service provider may require an API key. Without an API key the map could be hidden or render in a limited developer mode. */ apiKey?: string; /** * Map center’s latitude in degrees. * * @default 0 */ latitude?: number; /** * Map center’s longitude in degrees. * * @default 0 */ longitude?: number; /** * A label that describes the purpose or contents of the map. * * When set, it will be announced to users using assistive technologies and will provide them with more context. */ accessibilityLabel?: string; /** * The initial Map zoom level. * * Valid zoom values are numbers from zero up to 18. * Larger zoom values correspond to a higher resolution. * * @default 4 */ zoom?: number; /** * The maximum zoom level which will be displayed on the map. * * Valid zoom values are numbers from zero up to 18. * * @default 18 */ maxZoom?: number; /** * The minimum zoom level which will be displayed on the map. * * Valid zoom values are numbers from zero up to 18. * * @default 0 */ minZoom?: number; /** * Callback when the viewport bounds have changed or the map is resized. */ onBoundsChange?: (bounds: Bounds) => void; /** * Callback when the map view changes. */ onViewChange?: (location: Location, zoom: number) => void; /** * Callback when the user clicks on the map. */ onClick?: (location: Location) => void; /** * Callback when the user double-clicks on the map. */ onDblClick?: (location: Location) => void; } interface Location { latitude?: number; longitude?: number; } interface Bounds { northEast?: Location; southWest?: Location; } export {};