Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2XB3FinalProject
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Schankula
2XB3FinalProject
Commits
6b10bcd5
Commit
6b10bcd5
authored
6 years ago
by
Haley Glavina
Browse files
Options
Downloads
Patches
Plain Diff
Added comments to inforGenerator.js
parent
073cdc4e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tomcat/webapps/Trawl/infoGenerator.js
+10
-6
10 additions, 6 deletions
tomcat/webapps/Trawl/infoGenerator.js
with
10 additions
and
6 deletions
tomcat/webapps/Trawl/infoGenerator.js
+
10
−
6
View file @
6b10bcd5
/**
* Generates html text to fill info windows on a Google Maps API
* @param names String array of scientific fish names
* @param dates Array of JSON objects containing 3 arrays: Year[], Month[], Day[]
* @param count Integer array of counts of each fish species
* @returns String array where each entry is html code to describe a marker on a map
*/
function
infoGenerator
(
names
,
dates
,
count
){
var
infoArray
=
[];
for
(
int
i
=
0
;
i
<
names
.
length
;
i
++
){
// Initialize variables to each data point's information
var
year
=
dates
[
i
][
0
];
var
month
=
dates
[
i
][
1
];
var
day
=
dates
[
i
][
2
];
var
name
=
names
[
i
];
var
count
=
count
[
i
];
// Generate string of html
var
contentString
=
‘
<
div
id
=
“
content
”
>
‘
+
‘
<
div
id
=
“
siteNotice
”
>
‘
+
‘
<
/div>‘+
...
...
@@ -26,7 +33,4 @@ function infoGenerator(names, dates, count){
}
return
infoArray
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment