"
spoj+=''
if(a[i].obr != "")
spoj+=' | '
else
spoj+=''
spoj+=""+a[i].title+" "+a[i].takendate+" | "
spoj+=""
ox=a[i].x
oy=a[i].y
continue;
}
switch(a[i].specie)
{
case "sp.":
{
wikisp="https://en.wikipedia.org/wiki/"+a[i].genus
break;
}
case "negative":
case "":
{
wikisp="https://en.wikipedia.org/wiki/Null_result"
break;
}
default:
{
wikisp="https://en.wikipedia.org/wiki/"+a[i].genus+" "+a[i].specie
break;
}
}
// Bud prvni zaznam, nebo zmena pozice
// Predchozi pozice jen 1 zaznam?
if(sam != "")
{
samicon=geticon(a,i-1)
n[i] = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(ox,oy).transform(epsg4326,projectTo),{'description':sam},{'externalGraphic':samicon,'graphicHeight':24,'graphicWidth':24,'graphicXOffset':-12,'graphicYOffset':-12});
vectorLayerDynamic.addFeatures(n[i]);
spoj=""
sam=""
} // ELSE vytvori prazdny radek
// Predchozi pozice vic zaznamu?
if(spoj!="")
{
spojicon=geticon(a,i-1)
n[i] = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(ox,oy).transform(epsg4326,projectTo),{'description':""},{'externalGraphic':spojicon,'graphicHeight':24,'graphicWidth':24,'graphicXOffset':-12,'graphicYOffset':-12});
vectorLayerDynamic.addFeatures(n[i]);
spoj=""
sam=""
}
bylo=a[i].locality
spoj=''
if(a[i].obr != "")
spoj+=' | '
else
spoj+=''
spoj+=''+a[i].title+' '+a[i].takendate+' | '
spoj+="
"
sam=''
sam+='
'
sam+=''+(a[i].title=="negative"?"Negative observation":a[i].title)+'
'
if(a[i].imperium != "")
sam+='Domain: '+a[i].imperium+'
'
if(a[i].regnum != "")
sam+='Kingdom: '+a[i].regnum+'
'
if(a[i].phylum != "")
sam+='Phylum: '+a[i].phylum+'
'
if(a[i].classis != "")
sam+='Class: '+a[i].classis+'
'
if(a[i].ordo != "")
sam+='Order: '+a[i].ordo+'
'
if(a[i].familia != "")
sam+='Family: '+a[i].familia+'
'
if(a[i].genus != "" && a[i].genus!="negative")
sam+='Genus: '+a[i].genus+'
'
if(a[i].specie != "")
sam+='Species: '+a[i].specie+'
'
if(a[i].biotope != "")
sam+="Biotope: "+a[i].biotope+"
"
if(a[i].pov != "")
sam+="River: "+a[i].pov+"
"
if(a[i].temperature != "")
sam+="Temperature: "+a[i].temperature+" °C
"
if(a[i].pov != "")
sam+="Conductivity: "+a[i].conductivity+" mSv
"
if(a[i].pov != "")
sam+="pH: "+a[i].ph+"
"
if(a[i].takendate != "")
sam+="Date: "+a[i].takendate+"
"
sam+="Location: "+a[i].locality+" ("+a[i].locplain+")
"
if(a[i].observer != "")
sam+="Spectator: "+a[i].observer+"
"
if(a[i].micro != "")
sam+="Microscope: "+a[i].micro+" ("+a[i].microtyp+")
"
if(a[i].enlargement != "")
sam+="Amplification: "+a[i].enlargement+"
"
/* if [[ "$des" != "" ]]; then
# sam="$samDepictio: $des
"
# fi */
//if(a[i].videolink != "")
// sam+='Video: '+a[i].videolink+'
'
sam+=""
ox=a[i].x
oy=a[i].y
} // Konec prochazeni a[]
// Do not forget to print last line when FOR ends!
samicon=geticon(a,i-1)
if(sam == "")
sam=''
n[i]=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(a[i-1].x,a[i-1].y).transform(epsg4326,projectTo),{description:"'"+sam+"'"},{externalGraphic:samicon,graphicHeight:24,graphicWidth:24,graphicXOffset:-12,graphicYOffset:-12});
vectorLayerDynamic.addFeatures(n[i]);
} // Konec armageddonu
//var laycon = [vectorLayer,vectorLayerPonygon,vectorLayerDynamic,studlay];
var laycon = [vectorLayer,vectorLayerDynamic,studlay];
var controls = {selector: new OpenLayers.Control.SelectFeature(laycon, { onSelect: createPopup, onUnselect: destroyPopup })};
map.addControl(controls['selector']);
controls['selector'].activate();
function createPopup(feature)
{
feature.popup = new OpenLayers.Popup.FramedCloud('pop',
feature.geometry.getBounds().getCenterLonLat(),
null,
''+feature.attributes.description+'
',
null,
false, // Close button?
function() { controls['selector'].unselectAll(); }
);
//feature.popup.closeOnMove = true;
map.addPopup(feature.popup);
}
function destroyPopup(feature) {
feature.popup.destroy();
feature.popup = null;
}
// Vyhledavani
function limit()
{
srch=document.getElementById("srch").value.toLowerCase();
var p=[]
for(var i=0;i=0||
window.arma[i].imperium.toLowerCase().indexOf(srch)>=0||
window.arma[i].regnum.toLowerCase().indexOf(srch)>=0||
window.arma[i].phylum.toLowerCase().indexOf(srch)>=0||
window.arma[i].classis.toLowerCase().indexOf(srch)>=0||
window.arma[i].ordo.toLowerCase().indexOf(srch)>=0||
window.arma[i].familia.toLowerCase().indexOf(srch)>=0||
//window.arma[i].genus.toLowerCase().indexOf(srch)>=0|| // v "qualis"
//window.arma[i].observerie.toLowerCase().indexOf(srch)>=0||
window.arma[i].locplain.toLowerCase().indexOf(srch)>=0||
window.arma[i].description.toLowerCase().indexOf(srch)>=0||
window.arma[i].takendate.toLowerCase().indexOf(srch)>=0||
window.arma[i].micro.toLowerCase().indexOf(srch)>=0||
window.arma[i].microtyp.toLowerCase().indexOf(srch)>=0||
window.arma[i].biotope.toLowerCase().indexOf(srch)>=0||
window.arma[i].pov.toLowerCase().indexOf(srch)>=0)
p.push(arma[i])
}
icongeddon(p)
}
// ====== GEOJSON ======
var metageo=JSON.parse("{}");
var geje=[];
var gejbarva="";
function placegeo(coor,gejbarva)
{
var geja=new Array;
epsg4326 = new OpenLayers.Projection("EPSG:4326"); //WGS 1984 projection
projectTo = map.getProjectionObject();
for(i=0;i#[0-9a-fA-F]*<\/se:SvgParameter/)[0].match(/#[0-9a-fA-F]*/)[0];
getgeo(url,g,tmpc);
//console.log(tmpc);
}
}
request.open("GET",url+s,true);
request.send();
}
function getgeo(url,g,c)
{
var request;
if(window.XMLHttpRequest)
request=new XMLHttpRequest();
else
request=new ActiveXObject("Microsoft.XMLHTTP");
request.overrideMimeType("application/geo+json");
request.onreadystatechange=function()
{
if(request.readyState==4)
{
tmpg=JSON.parse(request.responseText);
for(var e=0;e