1. 28
    Create a Marker Component with the Leaflet API Map Instance
    51s

Create a Marker Component with the Leaflet API Map Instance

Share this video with your friends

Send Tweet

We now have the power of the Leaflet API to make changes to our Map instance. With this, we can recreate our Marker component by tapping directly into the Leaflet API and creating a new Leaflet Marker instance.

We'll walk through accessing our Map instance from the ref in our useEffect hook and using it to recreate our marker on the map.

Click here for exercise instructions