UNPKG

barikoi-map-widget

Version:

A customizable map widget built with React, designed for seamless integration with Barikoi's map services.

106 lines (98 loc) 2.86 kB
import React$1, { ReactNode } from 'react'; type PlaceType = { id: number | string; longitude: string; latitude: string; address: string; city: string; area: string; postCode: number; pType: string; subType: string; district: string; uCode: string; }; type BarikoiMapPropsType = { apiKey: string; initialViewState?: { longitude?: number; latitude?: number; minZoom?: number; maxZoom?: number; zoom?: number; }; controls?: { marker?: { enabled?: boolean; url?: string; }; fullscreen?: { enabled?: boolean; position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; }; geolocate?: { enabled?: boolean; position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; }; navigation?: { enabled?: boolean; position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; }; scale?: { enabled?: boolean; position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; }; }; mapStyle?: 'osm-liberty' | 'osm-bright' | 'barikoi-dark'; className?: { container?: string; }; }; type MapContextType = { zoomLevel: number; setZoomLevel: (zoom: number) => void; centerPoint: { lat: number; lng: number; }; setCenterPoint: (center: { lat: number; lng: number; }) => void; markerData: any[]; setMarkerData: (markerData: any[]) => void; }; type AutocompletePropsType = { apiKey: string; className?: { container?: string; input?: string; dropdown?: string; dropdownItem?: string; noResult?: string; clearButton?: string; }; }; type AutocompleteContextType = { searchedPlace: string; setSearchedPlace: (searchedText: string) => void; selectedPlace: any; setSelectedPlace: (place: PlaceType | null) => void; suggestions: PlaceType[]; setSuggestions: (suggestions: PlaceType[]) => void; isAutocompleteLoading: boolean; setIsAutocompleteLoading: (loading: boolean) => void; }; type BarikoiMapContextType = { autocomplete: AutocompleteContextType; map: MapContextType; }; declare const BarikoiAutocomplete: React$1.FC<AutocompletePropsType>; declare const BarikoiMap: React.FC<BarikoiMapPropsType>; declare const BarikoiMapProvider: React$1.FC<{ children: ReactNode; }>; declare const useBarikoiMapContext: () => BarikoiMapContextType; declare const useAutocomplete: () => AutocompleteContextType; declare const useMap: () => MapContextType; export { BarikoiAutocomplete, BarikoiMap, BarikoiMapProvider, useAutocomplete, useBarikoiMapContext, useMap };