Annotating points of interest

So far, you've seen how the MapView component can render the user's current location and points of interest around the user. The challenge here is that you probably want to show points of interest that are relevant to your application, instead of the points of interest that are rendered by default.

In this section, you'll learn how to render markers for specific locations on the map, as well as render regions on the map.

Plotting points

Let's plot some local breweries, shall we? Here's how you pass annotations to the MapView component:

import React from 'react'; import { AppRegistry, View, } from 'react-native'; import MapView from 'react-native-maps'; import styles from './styles'; const PlottingPoints = () => ( <View ...

Get React and React Native now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.