Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assignment 2 #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

yufeiy6
Copy link

@yufeiy6 yufeiy6 commented Feb 5, 2019

No description provided.

@yufeiy6
Copy link
Author

yufeiy6 commented Feb 5, 2019

Assignment 2 - Yufei Yuan

var header = [Object.keys(healthCenters[0])];
var TempArr = [Object.values(healthCenters)];
healthCentersArr = header.push(TempArr);
for (i=0; i < healthCentersArr.length; i++){console.log(healthCentersArr)};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are extremely close. But haven't quite gotten it.

header is an array that contains two sub arrays. The first is correct, but the second TempArr is an array with a collection of objects.

Do you see how these results looks different in the console:

image

versus
image

image

popupAnchor: [-3, -76],
});

var addMarkers1 = (map) => {return L.marker([obj[1],obj[0]]).bindPopuup(obj[3],{icon: addIcon1})};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - I am not seeing any markers appear on the map. Were you able to view them?

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you very nearly have it! It is very likely one line that needs to be fixed. But just try to run it again and see if you can find it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Ross,
I fixed the code. It should be able to run this time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants