if(typeof(featureInfoLayerPopup)==='undefined') var featureInfoLayerPopup = 'false'; if(typeof(featureInfoPopupHeight)==='undefined') var featureInfoPopupHeight = '200'; if(typeof(featureInfoPopupWidth)==='undefined') var featureInfoPopupWidth = '270'; if(typeof(featureInfoPopupPosition)==='undefined') var featureInfoPopupPosition = 'center'; if(typeof(featureInfoNoResultPopup)==='undefined') var featureInfoNoResultPopup = 'false'; var mod_featureInfoTunnel_elName = "featureInfoTunnel"; var mod_featureInfoTunnel_frameName = ""; var mod_featureInfoTunnel_target = ""; var mod_featureInfoTunnel_map = null; var mod_featureInfoTunnel_img_on = new Image(); mod_featureInfoTunnel_img_on.src = ""; var mod_featureInfoTunnel_img_off = new Image(); mod_featureInfoTunnel_img_off.src =""; var mod_featureInfoTunnel_img_over = new Image(); mod_featureInfoTunnel_img_over.src = ""; eventInit.register(function () { mb_regButton(function init_featureInfoTunnel(ind){ mb_button[ind] = document.getElementById(mod_featureInfoTunnel_elName); mb_button[ind].img_over = mod_featureInfoTunnel_img_over.src; mb_button[ind].img_on = mod_featureInfoTunnel_img_on.src; mb_button[ind].img_off = mod_featureInfoTunnel_img_off.src; mb_button[ind].status = 0; mb_button[ind].elName = mod_featureInfoTunnel_elName; mb_button[ind].fName = mod_featureInfoTunnel_frameName; mb_button[ind].go = new Function ("mod_featureInfoTunnel_click()"); mb_button[ind].stop = new Function ("mod_featureInfoTunnel_disable()"); mod_featureInfoTunnel_map = getMapObjByName(mod_featureInfoTunnel_target); }); }); function mod_featureInfoTunnel_click(){ var domNode = mod_featureInfoTunnel_map.getDomElement(); if (domNode) { $(domNode).bind("click", mod_featureInfoTunnel_event); } mod_featureInfoTunnel_map.getDomElement().style.cursor = "help"; } function mod_featureInfoTunnel_disable(){ var domNode = mod_featureInfoTunnel_map.getDomElement(); if (domNode) { $(domNode).unbind("click", mod_featureInfoTunnel_event); } mod_featureInfoTunnel_map.getDomElement().style.cursor = "default"; } function removeProgressWheel () { $("#" + mod_featureInfoTunnel_map.elementName + "_progressWheel").empty(); $("#" + mod_featureInfoTunnel_map.elementName + "_progressWheel").css("visibility","hidden"); } function mod_featureInfoTunnel_event(e){ eventBeforeFeatureInfo.trigger({"fName":mod_featureInfoTunnel_target}); //create progress wheel element var map_el = mod_featureInfoTunnel_map.getDomElement(); if (!map_el.ownerDocument.getElementById(mod_featureInfoTunnel_map.elementName + "_progressWheel")) { //create progress wheel element var $div = $("
"); map_el.appendChild($div.get(0)); } var point = mod_featureInfoTunnel_map.getMousePosition(e); var path = '../extensions/ext_featureInfoTunnel.php'; //TODO that code should go to featureInfo Redirect module var ind = getMapObjIndexByName(mod_featureInfoTunnel_target); if(document.getElementById("FeatureInfoRedirect")){ //fill the frames for(var i=0; i"); $("#" + mod_featureInfoTunnel_map.elementName + "_progressWheel").css({ position: "absolute", top: currentMapObjHeight, left: currentMapObjWidth, visibility: "visible", zIndex: 100 }); window.setTimeout("removeProgressWheel()", 10000); var currentRequest = urls[i]; var cnt = i; if(featureInfoPopupPosition.length == 2 && !isNaN(featureInfoPopupPosition[0]) && !isNaN(featureInfoPopupPosition[1])) { var dialogPosition = []; dialogPosition[0] = featureInfoPopupPosition[0]+cnt*25; dialogPosition[1] = featureInfoPopupPosition[1]+cnt*25; } else { var dialogPosition = featureInfoPopupPosition; } $(".fiResultFrame").remove(); $(".featureInfoTunnel-dialog").remove(); mb_ajax_post(path, {'url':currentRequest},function(js_code,status){ if(js_code){ if(featureInfoLayerPopup == 'true') { $("
").dialog({ bgiframe: true, autoOpen: true, title: '', dialogClass: "featureInfoTunnel-dialog", modal: false, width:parseInt(featureInfoPopupWidth, 10), height:parseInt(featureInfoPopupHeight, 10), position:dialogPosition, // This is a workaround if dialogs don't have the appropriate height // height: 450, // open: function(){ // $(this).css({ // "height": parseInt(featureInfoPopupHeight, 10)+ "px" // }); // }, close: function() { $(this).remove(); } }).parent().css({position:"fixed"}); $(".noResultFound").dialog("close"); } else{ window.open(path+"?url=" + encodeURIComponent(currentRequest), "" , "width="+featureInfoPopupWidth+",height="+featureInfoPopupHeight+",scrollbars=yes,resizable=yes"); } } if(featureInfoNoResultPopup == 'true' && featureInfoLayerPopup == 'true') { if($(".fiResultFrame").size() === 0) { $(".noResultFound").dialog("close"); $("
").dialog({ bgiframe: true, title: "", autoOpen: true, modal: false, width:300, height:200, position:[600,200] }).parent().css({position:"fixed"}); } } removeProgressWheel(); }); }()); } } else alert(unescape("Please select a layer! \n Bitte waehlen Sie eine Ebene zur Abfrage aus!")); } }