From 1a31776e17a39e2f0d20004f4c4d8a715ee3265a Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Fri, 8 Feb 2019 02:09:54 +0000 Subject: [PATCH] Yang Wang Week3 --- lab/lab1/part1-array-access.html | 28 +++++++++- lab/lab1/part2-fizzbuzz.html | 12 +++- lab/lab1/part3-data-transformation.html | 52 +++++++++++++++-- lab/lab1/part4-project-euler.html | 42 +++++++++++++- lab/lab2/part1.js | 16 +++--- lab/lab2/part4-underscore-refactor.js | 74 +++++++++++++++++++++++++ 6 files changed, 207 insertions(+), 17 deletions(-) diff --git a/lab/lab1/part1-array-access.html b/lab/lab1/part1-array-access.html index 0ec964f..29cd012 100644 --- a/lab/lab1/part1-array-access.html +++ b/lab/lab1/part1-array-access.html @@ -75,9 +75,31 @@ ===================== */ - L.marker([0, 0]).addTo(map); - L.marker([0, 0]).addTo(map); - L.marker([0, 0]).addTo(map); + let Restaurant1 = [40.034508187448395,-75.16472099534634,'Chinese']; + let Restaurant2 = [40.06738292573648,-75.17898120530263,'Japanese']; + let Restaurant3 = [39.967025897357665,-75.16141103997865,'American']; + + let restaurantData = [Restaurant1,Restaurant2,Restaurant3]; + + var icon=L.icon({ + iconUrl:'images/marker-icon.png', + iconSize: [32,38], + }); + + restaurantData.push( + [39.9530635609646,-75.18387328197538,'Spanish'], + [39.97183994499194,-75.16276471850303,'Italian'] + ); + + var addMarkers = function(map){ + for (var i=0; i - - + +