Welcome to Advanced Interactive Web Mapping, Programming, and Design, Class 4

This is a web page that can be viewed as slides.

→ to move forward

← to go back

Advanced Interactive Web Mapping, Programming, and Design

Class 4

finish in-class exercise, part 4 from last time

you can append to a document using jQuery

$('body').append(
    $('<div></div>').text('oh hi');           
);

$.each

$.each

run some code for each element in an array

$.each(array, function);

var names = [...];
$.each(names, function () {
  // this contains
  // the value you're on
});

var names = [...];
$.each(names, function () {
  // this contains
  // the value you're on
  console.log(this);
});

for example

in-class exercise, part 1

source
source

in-class exercise, part 2

"API" is maybe an overused term

Sometimes it describes a way of getting data

Sometimes features of a library

For now we'll focus on getting data

For now we'll focus on getting data

Wall St Daily
Twitter's API
Weather Underground
Foursquare
NYC Geoclient
Google Geocoding API
mashape
cooper hewitt
cooper hewitt
cooper hewitt
source
Mapzen Turn-by-Turn
Mapzen Search
example request
https://search.mapzen.com/v1/search?text=union%20square%20park%20ny&api_key=search-pLM3hiG
example request

in-class exercise, part 3