comparison gis_gui/lib/blocks.js @ 273:d1b43624cc63

some hacks to make the european4D connection work
author dwinter
date Thu, 23 Feb 2012 11:44:38 +0100
parents 260ec888fe15
children
comparison
equal deleted inserted replaced
270:3a5d51c60e40 273:d1b43624cc63
107 // loads list of id and type objects and executes callback function 107 // loads list of id and type objects and executes callback function
108 var url = "../db/RESTjson/db/public/gui_objects/"+escape(storeTag)+"/"+storeType+"?recursive=true"; 108 var url = "../db/RESTjson/db/public/gui_objects/"+escape(storeTag)+"/"+storeType+"?recursive=true";
109 jQuery.getJSON(url,callback); 109 jQuery.getJSON(url,callback);
110 }; 110 };
111 111
112 guiBlocks.prototype.e4DOpen = function(titel,tables){ 112 guiBlocks.prototype.e4DOpen = function(titel,tablesParam,from_year_name,until_year_name){
113 var e4D_URL="http://mappit.mpiwg-berlin.mpg.de:8080/e4D?"; 113 var e4D_URL="http://mappit.mpiwg-berlin.mpg.de:8080/e4D?";
114 var paramstr = "format=KML"; 114 var paramstr;
115 if (until_year_name!='') {
116 paramstr = "format=KML&from_year_name="+from_year_name+"&until_year_name="+until_year_name;
117 }else{
118 paramstr = "format=KML&from_year_name="+from_year_name
119 }
120
115 // var layer_URL = "http://chinagis-develop.mpiwg-berlin.mpg.de:9080/db/RESTdb/db/public/" + escape(table) + "?" + paramstr; 121 // var layer_URL = "http://chinagis-develop.mpiwg-berlin.mpg.de:9080/db/RESTdb/db/public/" + escape(table) + "?" + paramstr;
116 var layer_URL = ""; 122 var layer_URL = "";
117 123
124 var tables;
125
126 if (tablesParam instanceof Array) {
127 tables=tablesParam;
128 } else {
129 tables=new Array(tablesParam);
130 }
118 for (var i=0;i<tables.length;i++){ 131 for (var i=0;i<tables.length;i++){
119 if (i!=0) {e4D_URL=e4D_URL+"&";} 132 if (i!=0) {e4D_URL=e4D_URL+"&";}
120 layer_URL= "http://mappit.mpiwg-berlin.mpg.de/db/RESTdb/db/public/" + escape(tables[i]) + "?" + paramstr; 133 layer_URL= escape("http://mappit.mpiwg-berlin.mpg.de/db/RESTdb/db/public/" + tables[i] + "?" + paramstr);
134 //layer_URL= escape("http://dw.mpiwg-berlin.mpg.de:8080/db/RESTdb/db/public/" + tables[i] + "?" + paramstr);
121 e4D_URL=e4D_URL+"kml"+[i+1]+"="+layer_URL+"&source"+[i+1]+"=1"; 135 e4D_URL=e4D_URL+"kml"+[i+1]+"="+layer_URL+"&source"+[i+1]+"=1";
122 } 136 }
123 console.debug(" e4D_URL=", e4D_URL ); 137 console.debug(" e4D_URL=", e4D_URL );
124 var newwindow=window.open(e4D_URL,"Mappit@Europeana4D","height=800,width=900,resizable=1,scrollbars=1"); 138 var newwindow=window.open(e4D_URL,"Mappit@Europeana4D","height=800,width=900,resizable=1,scrollbars=1");
125 if (window.focus) {newwindow.focus();} 139 if (window.focus) {newwindow.focus();}