comparison WebContent/mmpa/mmpa.js @ 6:a7c8d212f5f4 JS-viewer tip

exchanged e4D for new JS-viewer (GeoTemCo) + whitespace-changes (sorry!)
author Sebastian Kruse <skruse@mpiwg-berlin.mpg.de>
date Tue, 22 Jan 2013 15:12:30 +0100
parents 6d286ce1a64f
children
comparison
equal deleted inserted replaced
5:2715bff4628d 6:a7c8d212f5f4
37 $("#displayChoice").load("/m/species"); 37 $("#displayChoice").load("/m/species");
38 }); 38 });
39 $("#applicants").click(function(){ 39 $("#applicants").click(function(){
40 $("#displayChoice").load("/m/applicants"); 40 $("#displayChoice").load("/m/applicants");
41 }); 41 });
42 42 /*
43 kml1=QueryString['kml1']; 43 kml1=QueryString['kml1'];
44 $("#restrictionChoiceApplicant").load("/m/restricted?path="+kml1+"&newRestriction=http%3A%2F%2Flocalhost%2Fm%2Fxpath%2F%2F%2Fapplicant%2Fname%2Ftext%28%29&select=%20distinct%20cast%28xpath%28%27//applicant/name/text%28%29%27,%20data%29%20as%20text[]%29%20AS%20name"); 44 $("#restrictionChoiceApplicant").load("/m/restricted?path="+kml1+"&newRestriction=http%3A%2F%2Flocalhost%2Fm%2Fxpath%2F%2F%2Fapplicant%2Fname%2Ftext%28%29&select=%20distinct%20cast%28xpath%28%27//applicant/name/text%28%29%27,%20data%29%20as%20text[]%29%20AS%20name");
45 45
46 $("#restrictionChoiceSpecies").load("/m/restricted?path="+kml1+"&newRestriction=http%3A%2F%2Flocalhost%2Fm%2Fxpath%2F%2F%2Fspecies%2Ftext%28%29&select=%20distinct%20cast%28xpath%28%27//species/text%28%29%27,%20data%29%20as%20text[]%29%20AS%20name"); 46 $("#restrictionChoiceSpecies").load("/m/restricted?path="+kml1+"&newRestriction=http%3A%2F%2Flocalhost%2Fm%2Fxpath%2F%2F%2Fspecies%2Ftext%28%29&select=%20distinct%20cast%28xpath%28%27//species/text%28%29%27,%20data%29%20as%20text[]%29%20AS%20name");
47 47 */
48 48
49 }); 49 });
50 50
51 var map;
52 var time;
53 var table;
54
55 $(document).ready(function() {
56
57 var mapDiv = document.getElementById("mapContainerDiv");
58 map = new WidgetWrapper();
59 var mapWidget = new MapWidget(map,mapDiv,{
60 mapTitle: "Publication Place"
61 });
62 var timeDiv = document.getElementById("plotContainerDiv");
63 time = new WidgetWrapper();
64 var timeWidget = new TimeWidget(time,timeDiv,{
65 timeTitle: "Publication Date"
66 });
67 var tableDiv = document.getElementById("tableContainerDiv");
68 table = new WidgetWrapper();
69 var tableWidget = new TableWidget(table,tableDiv);
70 });
51 71
52 function callKML(kml,title){ 72 function callKML(kml,title){
53 this.loadKml(kml,title); 73 var datasets = [];
74
75 var kmlFile = GeoTemConfig.getKml(kml);
76 datasets.push(new Dataset(GeoTemConfig.loadKml(kmlFile), title));
77
78 map.display(datasets);
79 time.display(datasets);
80 table.display(datasets);
81
82 //this.loadKml(kml,title);
54 //this.STICore.retrieveKML(1,kml); 83 //this.STICore.retrieveKML(1,kml);
55 }; 84 };
56 85
57 function callKMLs(kml1,kml2){ 86 function callKMLs(kml1,kml2){
58 this.loadKml(kml1,"applicants"); 87 var datasets = [];
59 this.loadKml(kml2,"research"); 88
89 var kmlFile1 = GeoTemConfig.getKml(kml1);
90 datasets.push(new Dataset(GeoTemConfig.loadKml(kmlFile1), "applicants"));
91 var kmlFile2 = GeoTemConfig.getKml(kml2);
92 datasets.push(new Dataset(GeoTemConfig.loadKml(kmlFile2), "research"));
93
94 map.display(datasets);
95 time.display(datasets);
96 table.display(datasets);
97
98 //this.loadKml(kml1,applicants);
99 //this.loadKml(kml2,"research");
60 100
61 }; 101 };