As we just noticed, we don't get the shadows to our markers by default. While we can add a custom one, we can use the default shadows which will work just as well with our custom markers.
Colby Fayock: [0:00] Our markers are looking good, but we're missing one thing. The shadows. Those shadows aren't specified by default, so we have to add them back in. To do that, we're going to first import that image straight from Leaflet.
[0:09] We're here. We have our markers shadow right from the Leaflet distribution. Back to our icon, we're going to set a shadowUrl, which we're going to set to our marker shadow.
[0:17] If we look at the map, we can see the shadow images, but they're not quite in the right spot. To fix this, we can set a shadowAnchor, which for this I've already figured out that it's 13 by 28. With that positioning, when we look back on our map, we can see our shadows.
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
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!