Mercurial > hg > events2kml
diff 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 |
line wrap: on
line diff
--- a/WebContent/mmpa/mmpa.js Tue Jan 22 15:07:06 2013 +0100 +++ b/WebContent/mmpa/mmpa.js Tue Jan 22 15:12:30 2013 +0100 @@ -39,23 +39,63 @@ $("#applicants").click(function(){ $("#displayChoice").load("/m/applicants"); }); - + /* kml1=QueryString['kml1']; $("#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"); $("#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"); - +*/ }); +var map; +var time; +var table; + +$(document).ready(function() { + + var mapDiv = document.getElementById("mapContainerDiv"); + map = new WidgetWrapper(); + var mapWidget = new MapWidget(map,mapDiv,{ + mapTitle: "Publication Place" + }); + var timeDiv = document.getElementById("plotContainerDiv"); + time = new WidgetWrapper(); + var timeWidget = new TimeWidget(time,timeDiv,{ + timeTitle: "Publication Date" + }); + var tableDiv = document.getElementById("tableContainerDiv"); + table = new WidgetWrapper(); + var tableWidget = new TableWidget(table,tableDiv); +}); function callKML(kml,title){ - this.loadKml(kml,title); + var datasets = []; + + var kmlFile = GeoTemConfig.getKml(kml); + datasets.push(new Dataset(GeoTemConfig.loadKml(kmlFile), title)); + + map.display(datasets); + time.display(datasets); + table.display(datasets); + + //this.loadKml(kml,title); //this.STICore.retrieveKML(1,kml); }; function callKMLs(kml1,kml2){ - this.loadKml(kml1,"applicants"); - this.loadKml(kml2,"research"); + var datasets = []; + + var kmlFile1 = GeoTemConfig.getKml(kml1); + datasets.push(new Dataset(GeoTemConfig.loadKml(kmlFile1), "applicants")); + var kmlFile2 = GeoTemConfig.getKml(kml2); + datasets.push(new Dataset(GeoTemConfig.loadKml(kmlFile2), "research")); + + map.display(datasets); + time.display(datasets); + table.display(datasets); + + //this.loadKml(kml1,applicants); + //this.loadKml(kml2,"research"); };