changeset 66:c7df41c5de53 trimmed_data

Alerts on missing time/spatial information
author Sebastian Kruse <skruse@mpiwg-berlin.mpg.de>
date Wed, 02 Jan 2013 13:19:08 +0100
parents 2446477fdeaa
children 5b049141a26e
files war/scripts/sti/STICore.js
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/war/scripts/sti/STICore.js	Tue Dec 18 12:30:32 2012 +0100
+++ b/war/scripts/sti/STICore.js	Wed Jan 02 13:19:08 2013 +0100
@@ -406,7 +406,6 @@
 	            	return date;
 				} catch (e) {
 					alert("\""+timeData+"\" is no valid time/date");
-	            	
 	            	return null;
 	            }
             }
@@ -417,6 +416,7 @@
 					timeStamp = getDate(timeData);
 				}
 				if( timeStamp == undefined ){
+					alert("No valid timestamp or timespan information for element " + i + ".");
 					continue;
 				}
 			}
@@ -432,7 +432,6 @@
 				}
 				catch(e){
 					alert("No valid timestamp or timespan information for element " + i + ".");
-
 					continue;
 				}
 			}
@@ -441,13 +440,13 @@
 				coordinates = placemark.getElementsByTagName("Point")[0].getElementsByTagName("coordinates")[0].childNodes[0].nodeValue;
             	var lonlat = coordinates.split(",");
             	if( lonlat[0] == "" || lonlat[1] == "" || isNaN(lonlat[0]) || isNaN(lonlat[1]) ){
+					alert("No valid coordinate information for element " + i + ".");
             		continue;
             	}
             	newObjects.push(new DataObject(name, description, place, timeStamp, timeSpan, g, lonlat[0], lonlat[1]));
 			}
 			catch(e){
 				alert("No valid coordinate information for element " + i + ".");
-
 				continue;
 			}
         }