Class presentation materials are on Google Drive here.
Objects recap
- An object is a series of ____’s : ____’s
- What kinds of things can be included in an object?
Intro to “client-side”
- What does client-side rendering mean in the context of web maps?
- 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.
- Describe how
feature
gets to themakeFeatureLabel()
function. - What does the
getDistrictNumber()
function do? - Looking at the callback to
map.on('click',...)
, what ise
and why do we need it?
For each of the following 2 prompts, commit an html file to the "class 4" folder in your class repo.
- 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.
- Building off of the previous exercise, add functionality that changes the color of the layer you just added when the user clicks on it.
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.
This week, you should prepare your second progress report. This is a minimal check-in that should include, at a minimum:
- What you worked on this week.
- Any changes you’ve made to your original proposal.
- A description of what you’ve built so far and, if applicable, a link to code (it’s ok if it doesn’t work!)
- 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.
- CSS diner. I ❤️ this game! It's great for practicing your CSS selector skills: https://flukeout.github.io/
- JavaScript loops: https://www.learn-js.org/en/Loops
- Anonymous functions in JavaScript: https://blog.scottlogic.com/2011/06/10/javascript-anonymous-functions.html
- JS arrays vs objects: LearnTeachCode/pair-partners#42