Skip to content

📝Lab Assignment #3 - GeoJSON and Buttons

Due 4/20

In this lab, we learned how to add buttons and a styled GeoJSON to our map. Your assignment this week has two parts:

  1. Part 1 - Create a map that will pan to certain makers when a button is clicked.
  2. Part 2- Create a map that is based off of a GeoJSON and styled.

For this assignment you can submit each map separately, either as week3a and week3b or something similar.

Requirements

  • Add at least 3 markers to the map using a JavaScript function (these markers can be same as lab assignment #2)
  • Use the <button> element to execute a JavaScript function to interact with your map
  • Add an Event Listener that executes the JavaScript function to interact with your map
  • Add a styled GeoJSON to your map (this can be a separate map)

Extra Credit

  • Combine both maps into one page with a common theme
  • Use something else like images or text to move the map.
  • Try something new with the Leaflet API

Submission