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

HW 2 Li Zhuang #21

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

Conversation

LiZhuang214
Copy link

No description provided.

popupAnchor: [0, -20]});


let healthArray = [["LNG","LAT","OBJECTID","NAME","ORGANIZATION","ZIP","PHONE","WEBSITE","DENTAL_PHONE","FULL_ADDRESS"]];
Copy link
Member

Choose a reason for hiding this comment

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

It'd be good to not have to type out each of these keys manually.

Take a look how at this: Object.keys(healthCenters[0]) Does all the work for you!

}
else {
L.marker([healthArray[j][1], healthArray[j][0]], {icon: iconDen}).addTo(map)
.bindPopup(`${healthArray[j].slice(3)}`);
Copy link
Member

@rossbernet rossbernet Feb 3, 2019

Choose a reason for hiding this comment

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

Did you mean to show just the name? Or everything also after the name?

image

It's a little busy. Slice is probably not the best method to use.

But if you change it to: .bindPopup(${healthArray[j][3]});

That just grabs the name

@rossbernet rossbernet mentioned this pull request Feb 3, 2019
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