UNPKG

@chayns-components/maps

Version:

A set of beautiful React components for developing your own applications with chayns.

43 lines (42 loc) 1.12 kB
import { FC } from 'react'; import type { IMarker, PolygonOptions, Position } from '../../types/positionInput'; export type PositionInputProps = { /** * The api token for google maps. */ apiToken: string; /** * The position of the center of the map on the initial render. */ initialPosition?: Position; /** * Markers that should be displayed. */ markers?: IMarker[]; /** * Function to be executed when a marker is added. */ onMarkerAdd?: (marker: IMarker) => void; /** * Function to be executed when a marker position is changed. */ onMarkerChange?: (markers: IMarker[]) => void; /** * Function to be executed when a marker is removed. */ onMarkerRemove?: (id: number) => void; /** * Options to style the polygon. */ polygonOptions?: PolygonOptions; /** * The placeholder of the search input. */ searchPlaceholder?: string; /** * The zoom of the map. */ zoom?: number; }; declare const PositionInput: FC<PositionInputProps>; export default PositionInput;