", null); popup.autoSize=true; feature.popup = popup; map.addPopup(popup); } function onFeatureUnselect(feature) { map.removePopup(feature.popup); feature.popup.destroy(); feature.popup = null; } function proj(){ //used in dataportal } function setlayer(i){ if(map.layers[i].visibility){ if(map.layers[i]==map.baseLayer) return; map.layers[i].setVisibility(false); }else{ if(map.layers[i].isBaseLayer) map.setBaseLayer(map.layers[i]); map.updateSize(); map.layers[i].setVisibility(true); } if(map.layers[i]!=map.baseLayer) { proj(); } getlegend(); } function setmultilayer(i, j) { var layernames=getLayersOrdered(); while (i " if(typeof(map.layers[i].styleMap)!='undefined') for(ci=1;ci " if(typeof(map.layers[i].styleMap)!='undefined') for(ci=1;ci " else for(ci=1;ci " /* opacity opacity = (map.layers[i].opacity == null | typeof(map.layers[i].opacity)=='undefined' | typeof(map.layers[i].opacity)=='NaN' | Math.round(map.layers[i].opacity * 10,1)/10==1 ? '1.0' : Math.round(map.layers[i].opacity * 10,1)/10 ) ostr = (opacity == 0.1 ? '' : "" ); ostr += (opacity == '1.0' ? '' : "" ); */ /* Z-order */ if(typeof(prev) != 'undefined') nstr+=""; if(typeof(next) != 'undefined') nstr+=""; if(typeof(checkorder(i))=='undefined') { nstr=''; lstr=''; } // oa background layers return("
" // +(ostr.length> 1 ? "Opacity:"+ opacity + " " + ostr + "" :"") +(opacityoptions==''?'':"opacity: "+opacityoptions+" ") +(coloroptions==''?'':"
color: "+coloroptions+" ") +(sizeoptions==''?'':"
size: "+sizeoptions+" ") +(nstr.length >1 ? "
order:" + nstr + "" : '' ) //+(nstr.length >1 ? "
z-order:" + checkorder(i) + " " + nstr + "" : '' ) +(lstr=='' ? '' : "
" + lstr + " legend " + "
" + qstr + " WFS query " ) + "
" ); } function toggleOption(i,optionname){ var obj; if(map.layers[i].options[optionname]) obj = eval("({" + optionname + ":false})"); else obj = eval("({" + optionname + ":true})"); map.layers[i].addOptions(obj); getlegend(); } function checkorder(i){ var ar= new Array(); var order; order=0; for(j=0;j0;j--) if(map.layers[j].visibility && !map.layers[j].isBaseLayer && map.layers[j].name.indexOf('OpenLayers.Control') 0.1 ) map.layers[i].setOpacity(byOpacity / 10) ; else map.layers[i].setOpacity(map.layers[i].opacity + byOpacity > 1 ? 1 : (map.layers[i].opacity + byOpacity k) { //Group detected => peak_index == index last grouped item last_group_index = peak_index; } if(map.layers[i].isBaseLayer && map.layers[i].name.indexOf('HIDDEN')==-1) theme=''; else if(map.layers[i].name.indexOf(':')) theme=map.layers[i].name.substring(0,map.layers[i].name.indexOf(':')); else theme=''; if(theme.indexOf('.')) theme=theme.substring(theme.indexOf('.')+1); // soms verdwijnt de kaart als je in FF naar een andere website gaat redrawing help dan misschien? map.layers[i].redraw(); if(map.layers[i].isBaseLayer){ type=" type='radio'"; if(map.layers[i]== map.baseLayer) checked=" checked "; else { if(map.layers[i].disabled) checked=" disabled "; map.layers[i].visibility=false; map.layers[i].display(); } } else{ type=" type='checkbox' "; if(map.layers[i].visibility) { checked=" checked "; } if(map.layers[i].disabled) checked+=" disabled "; } if(map.layers[i].url && typeof(map.layers[i].url)=='string' && map.layers[i].params && map.layers[i].visibility ) { if(map.layers[i].isBaseLayer || map.layers[i].params['nolegend'] || map.layers[i].options['hidelegend'] ){ urstr=''; }else{ urstr=map.layers[i].url; if (map.layers[i].options['legendgetcap']==0){ if(urstr.indexOf('?')==-1) urstr+='?'; urstr+= "&service=WMS&TRANSPARENT=true&REQUEST=GetLegendGraphic&VERSION=1.1.1&FORMAT=image/png&"; if(map.layers[i].params['map']) urstr+="&map=" + map.layers[i].params['map']; if(map.layers[i].params['CQL_FILTER']) urstr+='&CQL_FILTER=' + escape(map.layers[i].params['CQL_FILTER']); if(map.layers[i].params['SLD']) urstr+='&SLD=' + escape(map.layers[i].params['SLD']); if(map.layers[i].params['STYLES']) urstr+='&STYLE=' + map.layers[i].params['STYLES']; } } var layerstr=(typeof(map.layers[i].params['LAYERS'])=='string' ? map.layers[i].params['LAYERS'] : (typeof(map.layers[i].params['layers'])=='string' ? map.layers[i].params['layers'] : (typeof(map.layers[i].params['LAYERS'])=='array' ? map.layers[i].params['LAYERS'][0] : map.layers[i].name))); ar= layerstr.split(','); if(map.layers[i].options['legendgetcap']==0){ if(ar.length >1) { for(var j=0;j
"; if(ar[j]!=map.layers[i].name) lstr+= ""+ar[j]+"
"; if(urstr) lstr+= " "; lstr+= "" ; } } else if(ar.length==1 && urstr) istr=" " ; else if(urstr) lstr="" ; }else{ if(ar.length >1){ for(var j=0;j
"; if(ar[j]!=map.layers[i].name | ar.length>1) lstr+= ""+ar[j]+"
"; if(urstr){ lstr+= " "; lstr+= "" ; } } }else if(ar.length==1 && urstr){ istr=" " ; }else if(urstr){ lstr="" ; } } } else if(map.layers[i].color && map.layers[i].visibility){ istr=" " ; } if(theme!='HIDDEN') { if(theme && theme!=prevtheme) if(map.layers[i].options['hidetheme'] ) str+="
"+theme+"
"; else str+="
"+theme+"
"; if (VLIZGIS.legend_all_show_controls) genDisplayOptions(i); if(!map.layers[i].options['hidetheme'] ) { str+="
"; if(map.layers[i].visibility) { str+=""+displayname; if(VLIZGIS.legend_all_show_controls && typeof(controls)!='undefined' && controls!="") str+=""; if(!map.layers[i].options['nocontrols'] && typeof(controls)!='undefined') str+="
" + controls + "
"; } else str+=""+displayname; str+="
" + (VLIZGIS.legend_all_show_controls ? (istr + lstr) : '') + "" ; } } prevtheme=theme; if (last_group_index !== k) { //Group detected => peak_index == index last grouped item //but loop will augment also, hence the -1 k = last_group_index; } } OpenLayers.Util.getElement('legend').innerHTML="
" + str + "
"; aftergetLegend(); }//getlegend //used by clickmap function setHTML(response,event) { var str=response.responseText; OpenLayers.Util.getElement('nodelist').innerHTML += str; } // support GetFeatureInfo function clickmap (e) { OpenLayers.ProxyHost = 'aphia.php?p=proxy&call=proxy&url=' if(document.getElementById('nodelist')) document.getElementById('nodelist').innerHTML = ""; var i; for(i=0;iLat: " +Math.round(lonLat.lat*100)/100 + " Lon:" + Math.round(lonLat.lon*100)/100 + "" ); } //Fix for legend cannot contains links => use can override this function function getLegendDisplayMethod() { return 1; //Default should be parse due to backwards compatibility /*0) Don't parse */ /*1) Remove xxx: prefix from map name */ }
", null); popup.autoSize=true; feature.popup = popup; map.addPopup(popup); } function onFeatureUnselect(feature) { map.removePopup(feature.popup); feature.popup.destroy(); feature.popup = null; } function reprojectGML(oldp,newp){ for(var j=0; j