world-map-svg
Clickable World Map SVG.
Example
import { StyleSheet, Text, View } from 'react-native';
import WorldMap from 'react-native-world-map-svg'
export default function App() {
return (
<WorldMap onSelectContinent={(el) => alert(el)} color='black' selectedColor="red" />
);
}
Property | Type | Required | Default value | Description |
---|---|---|---|---|
color | string | yes | the color of the map | |
selectedColor | string | yes | when you select a Continent it get's this color | |
Continentcolors | object | no | if you want each continent to have it's own color example const colors ={ Africa:'#5B8437', SouthAmerica: '#DE7480', Europe: '#CE3B29', Asia: '#E7C73E', NorthAmerica: '#E6813E', Australia: '#815C28' } | |
onSelectContinent | funciton | yes | callback when the the continent is selected |