-
Notifications
You must be signed in to change notification settings - Fork 33
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
HW2_SagariDatta #27
Open
SagariDatta
wants to merge
4
commits into
MUSA611-CPLN692-spring2019:master
Choose a base branch
from
SagariDatta:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
HW2_SagariDatta #27
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<!--stylesheet imports--> | ||
<link rel="stylesheet" href="leaflet.css" /> | ||
</head> | ||
<body> | ||
<!--left panel--> | ||
<div style="position:fixed;left:0px;width:400px"> | ||
</div> | ||
<!--map--> | ||
<div id="map" style="position:fixed;right:0px;left:400px;height:100%;"> | ||
</div> | ||
|
||
<!--javascript imports--> | ||
<script src="leaflet.js"></script> | ||
<script src="health_centers.js"></script> | ||
|
||
<!--Your code starts here--> | ||
<script> | ||
var map = L.map('map', { | ||
center: [39.9522, -75.1639], | ||
zoom: 14 | ||
}); | ||
var Stamen_TonerLite = L.tileLayer('http://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.{ext}', { | ||
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>', | ||
subdomains: 'abcd', | ||
minZoom: 0, | ||
maxZoom: 20, | ||
ext: 'png' | ||
}).addTo(map); | ||
</script> | ||
<script> | ||
/* ===================== | ||
|
||
# Week 2 - Assignment | ||
|
||
## Introduction | ||
|
||
This week's assignment as having two separate parts: | ||
|
||
1. Log a series of arrays to the console that represents the health_centers dataset | ||
in array form. For example, [{'first': 1, 'second': 44}, {'first': 2, 'second': 12}] | ||
becomes [['first','second'],[1, 44],[2, 12]] | ||
|
||
2. Put a marker on the map for each health center in the specified lat/lng coordinates | ||
with a popup (a simple text dialog) that shows that location's name when its marker | ||
is clicked. | ||
|
||
EXTRA: Some of these locations offer dental services as well. Can you find some way to | ||
give dental locations a different icon? (Here's some relevant documentation: | ||
http://leafletjs.com/reference.html#icon) | ||
|
||
Remember: functions are meant to facilitate code comprehension and reuse. Try to | ||
use them to organize your code. | ||
===================== */ | ||
|
||
|
||
/* ===================== | ||
|
||
Start code | ||
|
||
===================== */ | ||
|
||
|
||
for (var i; i < healthCenters.length; i = i + 1) { | ||
print(healthCenters[i]); | ||
} | ||
|
||
var jsonToCsv = function(json) { console.log(json); }; | ||
|
||
|
||
var addMarkers = function(map) { | ||
var marker1 = L.marker([39.955032, -75.202487]).addTo(map); | ||
}; | ||
|
||
/* ===================== | ||
|
||
End code | ||
|
||
===================== */ | ||
|
||
|
||
jsonToCsv(healthCenters); | ||
addMarkers(map); | ||
</script> | ||
<!--Your code ends here--> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like there is only one marker added.
There should be more.