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
Published 4 years ago
Updated 3 years ago

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.

egghead
egghead
~ an hour ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today