react-native-world-map-svg

1.0.4 • Public • Published

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

See it on Github


Package Sidebar

Install

npm i react-native-world-map-svg

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

1.22 MB

Total Files

4

Last publish

Collaborators

  • elmehammedymajid