1. 22
    Add a React Leaflet Popup Component to Display the Name of an Existing Marker Component
    15s

Add a React Leaflet Popup Component to Display the Name of an Existing Marker Component

Colby Fayock
InstructorColby Fayock
Share this video with your friends

Social Share Links

Send Tweet

We now have a marker that shows our location, so let's add a name to it so anyone visiting our map can know what the location is.

We'll be using the React Leaflet Popup component to attach this tooltip popup to our existing Marker component.

Click here for exercise instructions

Instructor: [0:00] Having this marker isn't super helpful if we don't know what it is. We can add a pop-up to it with a name. First, we're going to import our pop-up from React-Leaflet. Then we can nest that right inside of our marker, where we can paste in Smithsonian National Air and Space Museum, where once we load the page we can click our marker and see our pop-up.