21

Geolocation and Maps

In this chapter, you’ll learn about the geolocation and mapping capabilities of React Native. You’ll start the learning process with how to use the Geolocation API, and then you’ll move on to using the MapView component to plot points of interest and regions. To do this, we’ll use the react-native-maps package to implement maps.

The goal of this chapter is to go over what’s available in React Native for geolocation and in react-native-maps for maps.

Here’s a list of the topics that we’ll cover in this chapter:

  • Using the Geolocation API
  • Rendering the map
  • Annotating points of interest

Technical requirements

You can find the code file for this chapter on GitHub at https://github.com/PacktPublishing/React-and-React-Native-5E/tree/main/Chapter2 ...

Get React and React Native - Fifth Edition 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.