Customizable Turkey map
Basic Map
PlayCode - StackBlitz - CodeSandbox - Vercel (Next.js) - CodePen (UMD) - JSFiddle (UMD)
Colorful Map
PlayCode - StackBlitz - CodeSandbox - Vercel (Next.js) - CodePen (UMD) - JSFiddle (UMD)
Basic Map
Colorful Map
Install with NPM
npm install react-turkey-map
import TurkeyMap from 'react-turkey-map'
export default () => {
return (
<TurkeyMap />
)
}
<TurkeyMap
showTooltip
colorData={{}}
tooltipData={{}}
/>
// types and defaults
showTooltip: bool (default: true)
colorData: object (default: {})
tooltipData: object (default: {})
// colorData prop
// plate: city color
colorData={{
'34': '#071E58',
'06': '#253494',
'35': '#253494',
'16': '#253494',
'07': '#225EA8'
}}
// tooltipData prop
// plate: city tooltip
tooltipData={{
'34': '15.655.924',
'06': '5.803.482',
'35': '4.479.525',
'16': '3.214.571',
'07': '2.696.249'
}}
Feel free to contribute. Open a new issue, or make a pull request.