Skip to main content

API Reference

Exports

import {
TurkeyMap,
CityMap,
type ITurkeyMap,
type ICityMap,
} from 'react-nvs-turkey-map';

Turkey Map

Props

TurkeyMap props are based on the internal IMap type, plus heatMapData.

PropTypeRequiredDefault
strokeColorstringNo"white"
strokeWidthstringNo"0.08"
hoverColorstringNo"#43a047"
defaultColorstringNo"#444"
maxWidthstringNo
heatMapColors{ min?: string; max?: string }No{ min: "#e3f2fd", max: "#c62828" }
heatMapDataPartial<Record<keyof typeof City, number>> | Partial<Record<City, number>>No
tooltipComponentReact.FC<{ name: string; plateNumber: number }>No
onClick(item: { name: string; plateNumber: number }) => voidNo

City Map

Props

PropTypeRequiredDefault
citystringYes
strokeColorstringNo"white"
strokeWidthstringNo"0.08"
hoverColorstringNo"#43a047"
defaultColorstringNo"#444"
maxWidthstringNo
heatMapColors{ min?: string; max?: string }No{ min: "#e3f2fd", max: "#c62828" }
heatMapDataRecord<string, number>No
tooltipComponentReact.FC<{ name: string }>No
onClick(item: { name: string }) => voidNo