We’ve done a little exploring with mouse move and click events.

In this lecture we’re going to learn about pop ups, and then we’ll move to designing choropleth maps.

This will build on last weeks lecture.

Recall that mouse events allow us to interact with our web maps

  • ‘mousemove’/‘mouseenter’/‘mouseleave’ events track where there pointer goes
    • if one or more conditions are met then execute some function
      • for example: change cursor to pointer if mouse moves over a specific layer
  • ‘mouseclick’ events listen for you to click the mouse button
    • if a click happens, then it looks where it happened and then executes a function
      • for example: click on a province layer and execute a command to change the layer color