comparison geotemco/js/Map/MapWidget.js @ 8:8f05c2a84bba

Apply new platin and Add tree layers
author nylin@mpiwg-berlin.mpg.de
date Wed, 07 Oct 2015 11:09:20 +0200
parents 57bde4830927
children
comparison
equal deleted inserted replaced
7:0330b2138c87 8:8f05c2a84bba
1088 1088
1089 /** 1089 /**
1090 * updates the the object layer of the map after selections had been executed in timeplot or table or zoom level has changed 1090 * updates the the object layer of the map after selections had been executed in timeplot or table or zoom level has changed
1091 */ 1091 */
1092 highlightChanged : function(mapObjects) { 1092 highlightChanged : function(mapObjects) {
1093 var hideEmptyCircles = false;
1094
1095 if (this.config.options.hideUnselected){
1096 var overallCnt = 0;
1097 for (var i in mapObjects){
1098 overallCnt += mapObjects[i].length;
1099 }
1100 if (overallCnt > 0){
1101 hideEmptyCircles = true;
1102 }
1103 }
1104
1093 if( !GeoTemConfig.highlightEvents ){ 1105 if( !GeoTemConfig.highlightEvents ){
1094 return; 1106 return;
1095 } 1107 }
1096 this.mds.clearOverlay(); 1108 this.mds.clearOverlay();
1097 if (this.selection.valid()) { 1109 if (this.selection.valid()) {
1101 } 1113 }
1102 var points = this.mds.getObjectsByZoom(); 1114 var points = this.mds.getObjectsByZoom();
1103 var polygon = this.openlayersMap.getExtent().toGeometry(); 1115 var polygon = this.openlayersMap.getExtent().toGeometry();
1104 for (var i in points ) { 1116 for (var i in points ) {
1105 for (var j in points[i] ) { 1117 for (var j in points[i] ) {
1118 var point = points[i][j];
1119
1120 if (hideEmptyCircles){
1121 point.feature.style.display = 'none';
1122 } else {
1123 point.feature.style.display = '';
1124 }
1125
1106 this.updatePoint(points[i][j], polygon); 1126 this.updatePoint(points[i][j], polygon);
1107 } 1127 }
1108 } 1128 }
1109 this.displayConnections(); 1129 this.displayConnections();
1130 this.objectLayer.redraw();
1110 }, 1131 },
1111 1132
1112 selectionChanged : function(selection) { 1133 selectionChanged : function(selection) {
1113 if( !GeoTemConfig.selectionEvents ){ 1134 if( !GeoTemConfig.selectionEvents ){
1114 return; 1135 return;