Working with Maps in React Native

Soktoev Aian
Dec 14, 2020

--

If you build a project and you are going to use a map, you have to use react-native-maps package.

Maps in React Native

In order to use react-native-maps you should do:

  1. install library:
npm install react-native-maps --save-exactoryarn add react-native-maps -E

2. import elements from this library:

react native maps elements

3. Render Map

Map rendering

There is some props inside <Marker> element:

  • Image: represents Marker Image
  • Callout: pop up element, which shows up when you press on marker element

My markerArray:

locations

I just hardcoded some locations

And as a result I got this:

Maps with Markers

I hope this blogpost would be helpful.

--

--