Part 1: Leaflet map events
- Open this Leaflet map that searches using Mapzen Search.
- Add an event handler to the map for one of the events listed in the docs. You can do whatever you like when the event occurs. At the very least, use
console.log() to prove that the event listener worked.
Part 2: Leaflet path events
- Leave the map open from part 1.
- Add a click handler to the features for one of the events listed in the docs for paths. This jsbin might be helpful. When the feature is clicked, try calling the
getStreetview function with the latitude and longitude to show streetview for that point.