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
d1f7464b
Commit
d1f7464b
authored
6 years ago
by
Winnie
Browse files
Options
Downloads
Patches
Plain Diff
Updates
- Broken
parent
aa47a2f9
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/infoWindow.js
+26
-26
26 additions, 26 deletions
tomcat/webapps/Trawl/infoWindow.js
with
26 additions
and
26 deletions
tomcat/webapps/Trawl/infoWindow.js
+
26
−
26
View file @
d1f7464b
...
...
@@ -13,34 +13,34 @@ function initInfo(lati, longi,name, date, count ) {
});
console
.
log
(
"
Gened info map
"
);
for
(
var
i
=
0
;
i
<
lati
.
length
;
i
++
){
console
.
log
(
"
Trying to plot
"
);
// Set info window contents to input string
var
contentString
=
'
<div id=“content”>
'
+
'
<div id=“siteNotice”>
'
+
'
</div>
'
+
'
<h1 id=“firstHeading” class=“firstHeading”>
'
+
name
[
i
]
+
'
</h1>
'
+
'
<div id=“bodyContent”>
'
+
'
<p><b>Name: </b>
'
+
name
[
i
]
+
'
</p>
'
+
'
<p><b>Date: </b>
'
+
findMonth
(
date
[
i
].
month
)
+
'
'
+
date
[
i
].
day
+
'
,
'
+
date
[
i
].
year
+
'
</p>
'
+
'
<p><b>Count: </b>
'
+
count
[
i
]
+
'
</p>
'
+
'
</div>
'
+
'
</div>
'
;
var
infowindow
=
new
google
.
maps
.
InfoWindow
({
content
:
contentString
});
// Plot points
// var marker = new google.maps.Marker({
// position: {lat: lati[i], lng: longi[i]} ,
// map: map,
// });
google
.
maps
.
event
.
addListener
(
'
click
'
,
function
(
marker
)
{
return
function
(){
var
infowindow
=
new
google
.
maps
.
InfoWindow
();
var
marker
,
i
;
for
(
i
=
0
;
i
<
lati
.
length
;
i
++
)
{
marker
=
new
google
.
maps
.
Marker
({
position
:
new
google
.
maps
.
LatLng
(
lati
[
i
],
longi
[
i
]),
map
:
map
});
google
.
maps
.
event
.
addListener
(
marker
,
'
click
'
,
(
function
(
marker
,
i
)
{
return
function
()
{
infowindow
.
setContent
(
'
<div id=“content”>
'
+
'
<div id=“siteNotice”>
'
+
'
</div>
'
+
'
<h1 id=“firstHeading” class=“firstHeading”>
'
+
name
[
i
]
+
'
</h1>
'
+
'
<div id=“bodyContent”>
'
+
'
<p><b>Name: </b>
'
+
name
[
i
]
+
'
</p>
'
+
'
<p><b>Date: </b>
'
+
findMonth
(
date
[
i
].
month
)
+
'
'
+
date
[
i
].
day
+
'
,
'
+
date
[
i
].
year
+
'
</p>
'
+
'
<p><b>Count: </b>
'
+
count
[
i
]
+
'
</p>
'
+
'
</div>
'
+
'
</div>
'
);
infowindow
.
open
(
map
,
marker
);
}
}
})(
marker
,
i
));
});
console
.
log
(
"
Plotted
"
+
i
+
"
markers
"
);
}
}
}
\ No newline at end of file
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