Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Latest commit

 

History

History
60 lines (38 loc) · 3.44 KB

README.md

File metadata and controls

60 lines (38 loc) · 3.44 KB

Content for class 4.

Class presentation materials are on Google Drive here.

Homework

For your class journal (2 points each):

Objects recap

  1. An object is a series of ____’s : ____’s
  2. What kinds of things can be included in an object?

Intro to “client-side”

  1. What does client-side rendering mean in the context of web maps?
  2. Why is it possible for Mapbox GL JS to place labels dynamically as you interact with the map?

Jurisdiction finder recap For the following 3 prompts, reference the working file and README.md in the jurisdiction finder explanation folder in the main class repo.

  1. Describe how feature gets to the makeFeatureLabel() function.
  2. What does the getDistrictNumber() function do?
  3. Looking at the callback to map.on('click',...), what is e and why do we need it?

Code exercises [10 points each]:

For each of the following 2 prompts, commit an html file to the "class 4" folder in your class repo.

  1. Using geojson.io, trace the outline of your childhood home. Using the skills we’ve learned in class, add your new GeoJSON to a Mapbox GL JS map.
  2. Building off of the previous exercise, add functionality that changes the color of the layer you just added when the user clicks on it.

Code practice [5 points each]:

This week, we have something new for you. We're using an interactive code editing tool called repl.io. Each of the links below will take you to a page with some code practice. Each one includes some guiding explanation as well as a set of exercises (each denoted with a number in square brackets, like [1]) for you to try. After you type some code into the pane on the left, you can click the "run" button to execute your code. Once you're satisfied with your code, you can turn in the exercise by opening an issue in your forked version of the class repo with the title "Class 4 code practice." Your issue can include either: copied and pasted code or a "share" link.

  1. Functions.
  2. Loops.

Project

This week, you should prepare your second progress report. This is a minimal check-in that should include, at a minimum:

  1. What you worked on this week.
  2. Any changes you’ve made to your original proposal.
  3. A description of what you’ve built so far and, if applicable, a link to code (it’s ok if it doesn’t work!)
  4. Any obstacles you need to overcome before you can move on to the next step.

To turn in your progress report, open an issue in your forked version of the class repo. The issue title should start with “[Progress report]” to let us know that it’s a progress report.

Include all of the above bullets and feel free to say “not applicable” if needed. Include any relevant links to code, data, or resources.

Additional learning materials

  1. CSS diner. I ❤️ this game! It's great for practicing your CSS selector skills: https://flukeout.github.io/
  2. JavaScript loops: https://www.learn-js.org/en/Loops
  3. Anonymous functions in JavaScript: https://blog.scottlogic.com/2011/06/10/javascript-anonymous-functions.html
  4. JS arrays vs objects: LearnTeachCode/pair-partners#42