Line 2: | Line 2: | ||
var WhitetailedDeer =new objection( [176,312], 2, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var WhitetailedDeer =new objection( [176,312], 2, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
var Elk =new objection( [253,344], 3,"https://static.igem.org/mediawiki/2016/d/db/T--Dalhousie_Halifax_NS--ElkModal.jpg") | var Elk =new objection( [253,344], 3,"https://static.igem.org/mediawiki/2016/d/db/T--Dalhousie_Halifax_NS--ElkModal.jpg") | ||
− | var | + | var WildTurkey =new objection( [328,260], 4, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") |
var SandhillCrane =new objection( [382,276], 5, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var SandhillCrane =new objection( [382,276], 5, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
var RedDeer =new objection( [335,385], 6,"https://static.igem.org/mediawiki/2016/1/1e/T--Dalhousie_Halifax_NS--RedDeerModal2.jpg") | var RedDeer =new objection( [335,385], 6,"https://static.igem.org/mediawiki/2016/1/1e/T--Dalhousie_Halifax_NS--RedDeerModal2.jpg") | ||
var Cougar =new objection( [380,325], 7, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var Cougar =new objection( [380,325], 7, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
var SwiftFox =new objection( [407,351], 8,"https://static.igem.org/mediawiki/2016/3/30/T--Dalhousie_Halifax_NS--SwiftFoxModal.jpg") | var SwiftFox =new objection( [407,351], 8,"https://static.igem.org/mediawiki/2016/3/30/T--Dalhousie_Halifax_NS--SwiftFoxModal.jpg") | ||
− | var | + | var TurkeyVulture =new objection( [388,391], 9, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") |
var BlackVulture =new objection( [363,429], 10, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var BlackVulture =new objection( [363,429], 10, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
var Waterfoul1 =new objection( [438,410], 11, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var Waterfoul1 =new objection( [438,410], 11, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
Line 25: | Line 25: | ||
var Waterfowl3 =new objection( [477,350], 25, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var Waterfowl3 =new objection( [477,350], 25, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
var Fisher =new objection( [435,311], 26,"https://static.igem.org/mediawiki/2016/f/fe/T--Dalhousie_Halifax_NS--FisherModal.jpg") | var Fisher =new objection( [435,311], 26,"https://static.igem.org/mediawiki/2016/f/fe/T--Dalhousie_Halifax_NS--FisherModal.jpg") | ||
− | var | + | var ArcticWolf =new objection( [604,96], 27,"https://static.igem.org/mediawiki/2016/8/87/T--Dalhousie_Halifax_NS--ArcticWolfModal.jpg") |
var TimberWolf =new objection( [614,79], 28,"https://static.igem.org/mediawiki/2016/a/a1/T--Dalhousie_Halifax_NS--TWolfModal.jpg") | var TimberWolf =new objection( [614,79], 28,"https://static.igem.org/mediawiki/2016/a/a1/T--Dalhousie_Halifax_NS--TWolfModal.jpg") | ||
var Waterfowl4 =new objection( [474,161], 29, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var Waterfowl4 =new objection( [474,161], 29, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
Line 36: | Line 36: | ||
var Porcupine =new objection( [354,238], 36, "https://static.igem.org/mediawiki/2016/7/7c/T--Dalhousie_Halifax_NS--Porcupine.jpg") | var Porcupine =new objection( [354,238], 36, "https://static.igem.org/mediawiki/2016/7/7c/T--Dalhousie_Halifax_NS--Porcupine.jpg") | ||
var RiverOtter =new objection( [327,235], 37,"https://static.igem.org/mediawiki/2016/6/6d/T--Dalhousie_Halifax_NS--OtterModal.jpg") | var RiverOtter =new objection( [327,235], 37,"https://static.igem.org/mediawiki/2016/6/6d/T--Dalhousie_Halifax_NS--OtterModal.jpg") | ||
− | var | + | var BaldEagle =new objection( [306,173], 38, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") |
var Kestrel =new objection( [271,203], 39, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var Kestrel =new objection( [271,203], 39, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
var BlackBear =new objection( [221,131], 40,"https://static.igem.org/mediawiki/2016/9/91/T--Dalhousie_Halifax_NS--BBearModal.jpg") | var BlackBear =new objection( [221,131], 40,"https://static.igem.org/mediawiki/2016/9/91/T--Dalhousie_Halifax_NS--BBearModal.jpg") | ||
− | var | + | var Owls =new objection( [266,148], 41, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") |
var PeregrineFalcon =new objection( [180,160], 42, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var PeregrineFalcon =new objection( [180,160], 42, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
var RedtailedHawk =new objection( [194,188], 43, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | var RedtailedHawk =new objection( [194,188], 43, "https://static.igem.org/mediawiki/2016/5/5f/T--Dalhousie_Halifax_NS--Micorbiomedatanotavaiable.jpg") | ||
Line 77: | Line 77: | ||
var newlength = map.height//2048 | var newlength = map.height//2048 | ||
− | var animal= [Groundhog,WhitetailedDeer,Elk, | + | var animal= [Groundhog,WhitetailedDeer,Elk,WildTurkey,SandhillCrane,RedDeer,Cougar,SwiftFox,TurkeyVulture,BlackVulture,Waterfoul1,Waterfoul2,Reindeer,SableIslandHorse,DallSheep,BighornSheep,Bobcat,EurasainLynx,Emu,Magpie,Marten,Coyote,Moose,RedFox,Waterfowl3,Fisher,ArcticWolf,TimberWolf,Waterfowl4,Mink,SnowshoeHare,OrnamentalFowl,Raccoon,Skunk,Beaver,Porcupine,RiverOtter,BaldEagle,Kestrel,BlackBear,Owls,PeregrineFalcon,RedtailedHawk,Waterfoul5,Waterfoul6,Waterfoul7,Waterfoul8] |
for (i=0; i<47; i++) { | for (i=0; i<47; i++) { | ||
animalx = (newx + ((animal[i].pos[0] -8)/780)*newwidth) | animalx = (newx + ((animal[i].pos[0] -8)/780)*newwidth) | ||
Line 100: | Line 100: | ||
function ThisisTheList(num) { | function ThisisTheList(num) { | ||
− | var animal= [Groundhog,WhitetailedDeer,Elk, | + | var animal= [Groundhog,WhitetailedDeer,Elk,WildTurkey,SandhillCrane,RedDeer,Cougar,SwiftFox,TurkeyVulture,BlackVulture,Waterfoul1,Waterfoul2,Reindeer,SableIslandHorse,DallSheep,BighornSheep,Bobcat,EurasainLynx,Emu,Magpie,Marten,Coyote,Moose,RedFox,Waterfowl3,Fisher,ArcticWolf,TimberWolf,Waterfowl4,Mink,SnowshoeHare,OrnamentalFowl,Raccoon,Skunk,Beaver,Porcupine,RiverOtter,BaldEagle,Kestrel,BlackBear,Owls,PeregrineFalcon,RedtailedHawk,Waterfoul5,Waterfoul6,Waterfoul7,Waterfoul8] |
− | var animalName= "Groundhog,WhitetailedDeer,Elk, | + | var animalName= "Groundhog,WhitetailedDeer,Elk,WildTurkey,SandhillCrane,RedDeer,Cougar,SwiftFox,TurkeyVulture,BlackVulture,Waterfoul,Waterfoul,Reindeer,SableIslandHorse,DallSheep,BighornSheep,Bobcat,EurasainLynx,Emu,Magpie,Marten,Coyote,Moose,RedFox,Waterfowl,Fisher,ArcticWolf,TimberWolf,Waterfowl,Mink,SnowshoeHare,OrnamentalFowl,Raccoon,Skunk,Beaver,Porcupine,RiverOtter,BaldEagle,Kestrel,BlackBear,Owls,PeregrineFalcon,RedtailedHawk,Waterfoul,Waterfoul,Waterfoul,Waterfoul, ".split(",") |
animalName[48]= " " | animalName[48]= " " | ||
var Bacterialists= [["Prevotella","CF231","Dyadobacter"],//Ground hog, When you have specific species to list but them in these boxes: each row represent the list for the corresponding in numerical order according teh the map (i.e the thrid row is for the elk) | var Bacterialists= [["Prevotella","CF231","Dyadobacter"],//Ground hog, When you have specific species to list but them in these boxes: each row represent the list for the corresponding in numerical order according teh the map (i.e the thrid row is for the elk) | ||
Line 182: | Line 182: | ||
modal.style.display = "block"; | modal.style.display = "block"; | ||
− | var animal= [Groundhog,WhitetailedDeer,Elk, | + | var animal= [Groundhog,WhitetailedDeer,Elk,WildTurkey,SandhillCrane,RedDeer,Cougar,SwiftFox,TurkeyVulture,BlackVulture,Waterfoul1,Waterfoul2,Reindeer,SableIslandHorse,DallSheep,BighornSheep,Bobcat,EurasainLynx,Emu,Magpie,Marten,Coyote,Moose,RedFox,Waterfowl3,Fisher,ArcticWolf,TimberWolf,Waterfowl4,Mink,SnowshoeHare,OrnamentalFowl,Raccoon,Skunk,Beaver,Porcupine,RiverOtter,BaldEagle,Kestrel,BlackBear,Owls,PeregrineFalcon,RedtailedHawk,Waterfoul5,Waterfoul6,Waterfoul7,Waterfoul8] |
var span = document.getElementsByClassName("close")[0]; | var span = document.getElementsByClassName("close")[0]; |
Revision as of 14:15, 19 October 2016
var Groundhog =new objection( [214,278], 1,"") //these represent the location of each of the animals on the map, if you change map you will have to change these (but not a change in scale, that should still function correctly) var WhitetailedDeer =new objection( [176,312], 2, "") var Elk =new objection( [253,344], 3,"") var WildTurkey =new objection( [328,260], 4, "") var SandhillCrane =new objection( [382,276], 5, "")
var RedDeer =new objection( [335,385], 6,"")
var Cougar =new objection( [380,325], 7, "") var SwiftFox =new objection( [407,351], 8,"") var TurkeyVulture =new objection( [388,391], 9, "") var BlackVulture =new objection( [363,429], 10, "") var Waterfoul1 =new objection( [438,410], 11, "") var Waterfoul2 =new objection( [348,491], 12, "") var Reindeer =new objection( [386,532], 13, "") var SableIslandHorse =new objection( [434,571], 14, "") var DallSheep =new objection( [499,528], 15, "") var BighornSheep =new objection( [527,478], 16, "") var Bobcat =new objection( [534,428], 17, "") var EurasainLynx =new objection( [542,407], 18, "") var Emu =new objection( [558,373], 19, "") var Magpie =new objection( [598,339], 20, "") var Marten =new objection( [632,331], 21,"") var Coyote =new objection( [678,418], 22,"") var Moose =new objection( [579,333], 23,"") var RedFox =new objection( [538,313], 24,"") var Waterfowl3 =new objection( [477,350], 25, "") var Fisher =new objection( [435,311], 26,"") var ArcticWolf =new objection( [604,96], 27,"") var TimberWolf =new objection( [614,79], 28,"") var Waterfowl4 =new objection( [474,161], 29, "") var Mink =new objection( [465,206], 30,"") var SnowshoeHare =new objection( [432,262], 31,"") var OrnamentalFowl =new objection( [412,220], 32, "") var Raccoon =new objection( [381,214], 33,"") var Skunk =new objection( [351,205], 34,"") var Beaver =new objection( [347,155], 35,"https://2016.igem.org/File:T--Dalhousie_Halifax_NS--BeaverModal.jpg") var Porcupine =new objection( [354,238], 36, "") var RiverOtter =new objection( [327,235], 37,"") var BaldEagle =new objection( [306,173], 38, "") var Kestrel =new objection( [271,203], 39, "") var BlackBear =new objection( [221,131], 40,"") var Owls =new objection( [266,148], 41, "") var PeregrineFalcon =new objection( [180,160], 42, "") var RedtailedHawk =new objection( [194,188], 43, "") var Waterfoul5 =new objection( [407,177], 44, "") var Waterfoul6 =new objection( [340,140], 45, "") var Waterfoul7 =new objection( [407,123], 46, "") var Waterfoul8 =new objection( [433,64], 47, "")
function objection ( position, listNum, listImage) { this.pos = position this.list = listNum this.png = listImage
}
function mainFunction() { outputfunct(ThisisTheList(whatlist(cursorPosition()))) }
function cursorPosition() { var x = event.offsetX?(event.offsetX):event.pageX-document.getElementById("map").offsetLeft; var y = document.getElementById("map").height - event.offsetY?(event.offsetY):event.pageY + document.getElementById("map").offsetTop;
//console.log("x:" + x + "y:" + y) //delete the "//" over there for a handy diagnostic tool var z = [x,y] return(z) }
function whatlist(z) {//IMPORTANT when you choose a new location or scale for the map change these variables accordingly so that the map will work. the y&x variables refer to the top left pixel of the map from the top left of the screen. var spot = map.getBoundingClientRect(); var newy = 8 var newx = 8 //console.log(map.width, map.height) var newwidth = map.width//1536 var newlength = map.height//2048
var animal= [Groundhog,WhitetailedDeer,Elk,WildTurkey,SandhillCrane,RedDeer,Cougar,SwiftFox,TurkeyVulture,BlackVulture,Waterfoul1,Waterfoul2,Reindeer,SableIslandHorse,DallSheep,BighornSheep,Bobcat,EurasainLynx,Emu,Magpie,Marten,Coyote,Moose,RedFox,Waterfowl3,Fisher,ArcticWolf,TimberWolf,Waterfowl4,Mink,SnowshoeHare,OrnamentalFowl,Raccoon,Skunk,Beaver,Porcupine,RiverOtter,BaldEagle,Kestrel,BlackBear,Owls,PeregrineFalcon,RedtailedHawk,Waterfoul5,Waterfoul6,Waterfoul7,Waterfoul8] for (i=0; i<47; i++) { animalx = (newx + ((animal[i].pos[0] -8)/780)*newwidth) animaly = (newy + ((animal[i].pos[1] -8)/949.3)*newlength)
//animal[i].pos[0] = (newwidth) //animal[i].pos[1] = (newlength) var w = 17 var l = 17 if (z[0] > animalx-w) { if (z[0] < animalx+w) { if (z[1] > animaly-l) { if (z[1] < animaly+l) { return(i) { break;} }}}}
} var i=48 return(i) }
function ThisisTheList(num) { var animal= [Groundhog,WhitetailedDeer,Elk,WildTurkey,SandhillCrane,RedDeer,Cougar,SwiftFox,TurkeyVulture,BlackVulture,Waterfoul1,Waterfoul2,Reindeer,SableIslandHorse,DallSheep,BighornSheep,Bobcat,EurasainLynx,Emu,Magpie,Marten,Coyote,Moose,RedFox,Waterfowl3,Fisher,ArcticWolf,TimberWolf,Waterfowl4,Mink,SnowshoeHare,OrnamentalFowl,Raccoon,Skunk,Beaver,Porcupine,RiverOtter,BaldEagle,Kestrel,BlackBear,Owls,PeregrineFalcon,RedtailedHawk,Waterfoul5,Waterfoul6,Waterfoul7,Waterfoul8] var animalName= "Groundhog,WhitetailedDeer,Elk,WildTurkey,SandhillCrane,RedDeer,Cougar,SwiftFox,TurkeyVulture,BlackVulture,Waterfoul,Waterfoul,Reindeer,SableIslandHorse,DallSheep,BighornSheep,Bobcat,EurasainLynx,Emu,Magpie,Marten,Coyote,Moose,RedFox,Waterfowl,Fisher,ArcticWolf,TimberWolf,Waterfowl,Mink,SnowshoeHare,OrnamentalFowl,Raccoon,Skunk,Beaver,Porcupine,RiverOtter,BaldEagle,Kestrel,BlackBear,Owls,PeregrineFalcon,RedtailedHawk,Waterfoul,Waterfoul,Waterfoul,Waterfoul, ".split(",") animalName[48]= " " var Bacterialists= [["Prevotella","CF231","Dyadobacter"],//Ground hog, When you have specific species to list but them in these boxes: each row represent the list for the corresponding in numerical order according teh the map (i.e the thrid row is for the elk) ["","",""], ["5-7N15","Bacillus","Treponema"],//elk ["","",""], ["","",""], ["Prevotella","Fibrobacter","Ruminococcus"],//reDeer ["","",""], ["Desulfovibrio","Phascolarctobacterium","Roseburia"],//swiftFox ["","",""], ["","",""], ["","",""],//My system cant handle multiple locations with the same list, so I apologise but you'll need to write in the waterfowl list in several places (which i have marked), just copy and paste. ["","",""],//waterfowl ["","",""], ["","",""], ["","",""], ["","",""], ["","",""], ["","",""], ["","",""], ["","",""], ["Flavobacterium","Acineobacter","Pseudomonas"],//marten ["Collinsella","Coprobacillus","Allobaculm"],//Coyote ["Bacillus","Silibacillus","Treponema"],//Moose ["Collinsella","Coprobacillus","Anaeroplasma"],//Red Fox ["","",""],//waterfowl ["Bifidobacterium","Paludibacter","Aerococcus"],//fisher ["Collinsella","Megamonas","Anaerobiospirillum"],//articWolf ["Bifidobacterium","Collinsella","Anaeroplasma"],//timber wolf ["","",""],//waterfowl ["Aequorivita","Ulvibacter","Vagococcus"],//mink ["Succiniclasticum","Oxalobacter","Bilophila"],//snowshoe hare ["","",""], ["Lactococcus","Helicobacter","Enterococcus"],//racoon ["Vitreoscilla","Ewingella","Proteus"],//skunk ["YRC22","Cetobacterium","Akkermansia"], //beaver ["Akkermansia","Stenotropomonas","Coprococcus"], //porcupine ["Leucobacter","Myroides","Vagococcus"],//otter ["","",""], ["","",""], ["Myroides","Paracoccus","Wautersialla"],//black bear ["","",""], ["","",""], ["","",""], ["","",""], ["","",""],//waterfowl ["","",""],//waterfowl ["","",""],//waterfowl ["","",""],//waterfowl [" "," "," "," "," "]] for (i=0; i<48; i++) { if (Bacterialists[num][i] == undefined) { Bacterialists[num][i] = " " } }
var output="
"+ animalName[num] + "
" + Bacterialists[num][0] + "
" + Bacterialists[num][1] + "
" + Bacterialists[num][2] + "
" + Bacterialists[num][3] + "
" + Bacterialists[num][4] + "
" //if you require more items than 5 in a given list, you may copy this pattern (and do so in the previous array), I've programmed it so that it should still work.
return(output) }
function outputfunct(output) {
document.getElementById("BactList").innerHTML = output document.getElementById("BactList").style.left = event.pageX+ 0 + "px" //change 0 if you want to change where the list is relative to the cursor on the respective axis document.getElementById("BactList").style.top = event.pageY + 0 + "px"
}
function extraInfo() { ThisisTheExtraList(whatlist(cursorPosition()))
} function ThisisTheExtraList (num) { var modal = document.getElementById('theModal')
var span = document.getElementsByClassName("close")[0];
modal.style.display = "block";
var animal= [Groundhog,WhitetailedDeer,Elk,WildTurkey,SandhillCrane,RedDeer,Cougar,SwiftFox,TurkeyVulture,BlackVulture,Waterfoul1,Waterfoul2,Reindeer,SableIslandHorse,DallSheep,BighornSheep,Bobcat,EurasainLynx,Emu,Magpie,Marten,Coyote,Moose,RedFox,Waterfowl3,Fisher,ArcticWolf,TimberWolf,Waterfowl4,Mink,SnowshoeHare,OrnamentalFowl,Raccoon,Skunk,Beaver,Porcupine,RiverOtter,BaldEagle,Kestrel,BlackBear,Owls,PeregrineFalcon,RedtailedHawk,Waterfoul5,Waterfoul6,Waterfoul7,Waterfoul8]
var span = document.getElementsByClassName("close")[0];
if (num == 48) { modal.style.display = "none"; } //document.getElementById("modalContent").innerHTML = animal[num].disc document.getElementById("modalImage").src = animal[num].png//animal[num].png }