1. Added front-end for map of science vis.
2. Added Data tables for disciplines/sub-disciplines in the vis. 3. added support for different csv downloadables. 4. Added new updated libraries for DataTables plugin.
This commit is contained in:
parent
3fdc267806
commit
ca08343379
27 changed files with 8950 additions and 163 deletions
|
@ -1,59 +1,71 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
function switchMarkerManager(id) {
|
||||
|
||||
markerManager = getMarkerManager(id);
|
||||
if(isActiveMarkerManager(markerManager)) {
|
||||
markerManager.addAllToMap();
|
||||
|
||||
if(activeMarkerManager) {
|
||||
activeMarkerManager.removeAllFromMap();
|
||||
}
|
||||
|
||||
/* switch to target marker manager */
|
||||
activeMarkerManager = markerManager;
|
||||
}
|
||||
}
|
||||
|
||||
function isActiveVisMode(visMode) {
|
||||
return (currentVisMode == visMode);
|
||||
}
|
||||
|
||||
function getVisModeController(visMode){
|
||||
return visModeControllers[visMode];
|
||||
}
|
||||
|
||||
function switchVisMode(visMode) {
|
||||
if (currentVisMode != visMode) {
|
||||
currentVisMode = visMode;
|
||||
if (currentController) {
|
||||
currentController.cleanView();
|
||||
}
|
||||
currentController = getVisModeController(visMode);
|
||||
currentController.initView();
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
function loadMarkers(visMode, url, sync) {
|
||||
|
||||
// Download data from server and add to markerManager if not gotten already
|
||||
var controller = getVisModeController(visMode);
|
||||
if (controller.needLoaded()) {
|
||||
if (sync) {
|
||||
downloader.downloadAndWait(url, function(data) {
|
||||
loadJSONToMarkerManager(data, visMode);
|
||||
});
|
||||
} else {
|
||||
downloader.download(url, function(data) {
|
||||
loadJSONToMarkerManager(data, visMode);
|
||||
});
|
||||
}
|
||||
} // end if
|
||||
}
|
||||
|
||||
function loadJSONToMarkerManager(data, visMode) {
|
||||
if (data) {
|
||||
var controller = getVisModeController(visMode);
|
||||
controller.loadJsonData(data[0]);
|
||||
}
|
||||
}
|
||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
function switchMarkerManager(id) {
|
||||
|
||||
markerManager = getMarkerManager(id);
|
||||
if(isActiveMarkerManager(markerManager)) {
|
||||
markerManager.addAllToMap();
|
||||
|
||||
if(activeMarkerManager) {
|
||||
activeMarkerManager.removeAllFromMap();
|
||||
}
|
||||
|
||||
/* switch to target marker manager */
|
||||
activeMarkerManager = markerManager;
|
||||
}
|
||||
}
|
||||
|
||||
function isActiveVisMode(visMode) {
|
||||
return (currentVisMode == visMode);
|
||||
}
|
||||
|
||||
function getVisModeController(visMode){
|
||||
return visModeControllers[visMode];
|
||||
}
|
||||
|
||||
function switchVisMode(visMode) {
|
||||
if (currentVisMode != visMode) {
|
||||
currentVisMode = visMode;
|
||||
if (currentController) {
|
||||
currentController.cleanView();
|
||||
}
|
||||
currentController = getVisModeController(visMode);
|
||||
currentController.initView();
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
function loadMarkers(visMode, url, sync) {
|
||||
|
||||
// Download data from server and add to markerManager if not gotten already
|
||||
var controller = getVisModeController(visMode);
|
||||
if (controller.needLoaded()) {
|
||||
if (sync) {
|
||||
downloader.downloadAndWait(url, function(data) {
|
||||
loadJSONToMarkerManager(data, visMode);
|
||||
loadJSONToDataTableWidget(data);
|
||||
});
|
||||
} else {
|
||||
downloader.download(url, function(data) {
|
||||
loadJSONToMarkerManager(data, visMode);
|
||||
loadJSONToDataTableWidget(data);
|
||||
});
|
||||
}
|
||||
} // end if
|
||||
}
|
||||
|
||||
function loadJSONToMarkerManager(data, visMode) {
|
||||
if (data) {
|
||||
var controller = getVisModeController(visMode);
|
||||
controller.loadJsonData(data[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function loadJSONToDataTableWidget(data) {
|
||||
if (data) {
|
||||
var widget = dataTableWidgets["MAIN_SCIENCE_AREAS"];
|
||||
widget.loadJsonData(data[0]);
|
||||
widget.initView();
|
||||
|
||||
$("#" + responseContainerID).unblock();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue