[Mapbender-commits] r2101 - branches/2.5/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Feb 19 08:48:34 EST 2008


Author: christoph
Date: 2008-02-19 08:48:34 -0500 (Tue, 19 Feb 2008)
New Revision: 2101

Modified:
   branches/2.5/http/javascripts/event.js
   branches/2.5/http/javascripts/geometry.js
Log:
jslinted

Modified: branches/2.5/http/javascripts/event.js
===================================================================
--- branches/2.5/http/javascripts/event.js	2008-02-19 13:47:59 UTC (rev 2100)
+++ branches/2.5/http/javascripts/event.js	2008-02-19 13:48:34 UTC (rev 2101)
@@ -55,7 +55,7 @@
 			}
 		}
 		return false;
-	}
+	};
 	
 	/**
 	 * This function triggers the event
@@ -130,7 +130,7 @@
 	
 	this.getProperties = function () {
 		return propertiesObj;
-	}
+	};
 
 	// private
 	/**
@@ -186,7 +186,7 @@
 			var returnValue = eval(str);
 			return returnValue;
 		}	
-	}
+	};
 	
 	// private
 	var func = aFunction;

Modified: branches/2.5/http/javascripts/geometry.js
===================================================================
--- branches/2.5/http/javascripts/geometry.js	2008-02-19 13:47:59 UTC (rev 2100)
+++ branches/2.5/http/javascripts/geometry.js	2008-02-19 13:48:34 UTC (rev 2101)
@@ -225,7 +225,7 @@
 
 	str += "}";
 	return str;
-}
+};
 
 GeometryArray.prototype.getBBox = function(){
 	var q = this.get(0).get(0).get(0);
@@ -256,9 +256,9 @@
 					isFeatureCollection = (geoJSON[i] == "FeatureCollection") ? true : false;
 					break;
 				case "crs":
-					if (geoJSON[i]["type"] == "EPSG") {
-						featureCollectionEpsg = geoJSON[i]["properties"]["code"];
-						featureEpsg = geoJSON[i]["properties"]["code"];
+					if (geoJSON[i].type == "EPSG") {
+						featureCollectionEpsg = geoJSON[i].properties.code;
+						featureEpsg = geoJSON[i].properties.code;
 					}
 					break;
 				case "features":
@@ -295,8 +295,8 @@
 											break;
 										
 										case "crs":
-											if (currentFeature[k]["type"] == "EPSG") {
-												featureEpsg = currentFeature[k]["properties"]["code"];
+											if (currentFeature[k].type == "EPSG") {
+												featureEpsg = currentFeature[k].properties.code;
 											}
 											break;
 
@@ -421,10 +421,10 @@
 			var placemarkId = this.get(i).e.getElementValueByName("Mapbender:placemarkId");
 
 			// only add placemark ids once!
+			var isFound = false;
 			for (var j = 0; j < multiGeometriesFromKml && isFound === false; j++) {
-				var isFound = false;
 				if (multiGeometriesFromKml == placemarkId) {
-					isFound == true;
+					isFound = true;
 				}
 			}
 			if (!isFound) {
@@ -458,7 +458,7 @@
 
 	str += "]}";
 	return str;
-}
+};
 	
 /**
  * @class a MultiGeometry is a List of Geometry objects
@@ -555,7 +555,7 @@
 	realBox.get(-1).addPointByCoordinates(bbox[1].x, bbox[0].y);
 	realBox.get(-1).close();
 	return realBox;
-}
+};
 
 /**
  * gets the center of the bounding box of this {@link MultiGeometry}.
@@ -630,7 +630,7 @@
 		return true;
 	}
 	return false;
-}
+};
 
 MultiGeometry.prototype.toString = function () {
 	var str = this.toStringWithoutProperties();
@@ -689,7 +689,7 @@
 		return this.get(0).getEpsg();
 	}
 	return false;
-}
+};
 
 /**
  * @class a Geometry is a List of Point objects. If it is a polygon, the last point has 
@@ -886,7 +886,7 @@
 	 */
 	this.getEpsg = function () {
 		return epsg;
-	}
+	};
 	
 	this.list = [];
 	var dist = [];
@@ -996,7 +996,7 @@
 	}
 	
 	return str;
-}
+};
 
 
 
@@ -1114,7 +1114,7 @@
 		str += "}";
 	}
 	return str;
-}
+};
 
 /**
  * @class a {@link Canvas} contains a {@link DivTag} that holds graphics rendered by {@link jsGraphics}
@@ -1221,7 +1221,7 @@
 	
 	this.setDiameter = function (px) {
 		diameter = px;
-	}
+	};
 	
 	/**
 	 * draws a circle with {@link jsGraphics}.
@@ -1270,7 +1270,7 @@
 		newImg.style.left = x - Math.round(newImg.width/2);
 		newImg.style.zIndex = 100;
 		that.canvasDivTag.getTag().appendChild(newImg);
-	}
+	};
 	
 	/**
 	 * This is the {@link DivTag} that contains the output by {@link jsGraphics}.
@@ -1406,30 +1406,30 @@
 			if (typeof(canvas[i]) !== 'undefined') {
 				canvas[i].canvasDivTag.getTag().onmouseover = function (e) {
 					callback(e);
-				}
+				};
 			}
 		}
-	}
+	};
 	
 	this.setMouseOut = function (callback) {
 		for (var i=0; i<targets.length; i++){
 			if (typeof(canvas[i]) !== 'undefined') {
 				canvas[i].canvasDivTag.getTag().onmouseout = function (e) {
 					callback(e);
-				}
+				};
 			}
 		}
-	}
+	};
 	
 	this.setMouseClick = function (callback) {
 		for (var i=0; i<targets.length; i++){
 			if (typeof(canvas[i]) !== 'undefined') {
 				canvas[i].canvasDivTag.getTag().onclick = function (e) {
 					callback(e);
-				}
+				};
 			}
 		}
-	}
+	};
 	
 	var lineWidth = aLineWidth;
 	var tagname = 'mod_gaz_draw'+aTagName;



More information about the Mapbender_commits mailing list