Goals
The goal of this module is to learn enough javascript to be able to be able to complete a tutorial on web mapping using something like Leaflet. End goal is to move toward being able to create things like these:
PhillyBikeTheft
London Crime Map
Lizzy Diamond's Slide Show can help get us started.
Tools
We will use CodeAcademy to get started in javascript.
Background
What is an object?
What is a web page?
- What we see.
- What we code.
- How the browser handles it (and hence, how we can write code that manipulates it)
A Little Bit of HTML
Hypertext Markup Language is a coding system used to define the way text and other elements are displayed by browsers. For the most part, all HTML consists of matched "tags" surrounding that indicated what the generic style of text is. Some examples:
|
We can draw a sort of "family tree" diagram of the page:

Try It Yourself: Draw the tree diagram for the following HTML:
<html>
<head>
<title>This is an Important Page</title>
</head>
<body>
<h1>An Important Heading</h1>
<p>
What do we need to do this weekend?
</p>
<p>
<ol>
<li>Work on SOC128</li>
<li>Have fun (working on SOC128)</li>
<li>Post on FB (about working on SOC128)</li>
</ol>
</p>
</body>
</html>
|
You Try It: There are many web-based workbenches where you can see code in action and try it for yourself.
|
References
Chris Essig Creating responsive maps with Leaflet, Google Docs
TimesMachine