[Mapbender-commits] r5813 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Mar 19 10:37:32 EDT 2010


Author: christoph
Date: 2010-03-19 10:37:29 -0400 (Fri, 19 Mar 2010)
New Revision: 5813

Modified:
   trunk/mapbender/http/javascripts/geometry.js
Log:
set defaults if input is NaN

Modified: trunk/mapbender/http/javascripts/geometry.js
===================================================================
--- trunk/mapbender/http/javascripts/geometry.js	2010-03-19 14:36:24 UTC (rev 5812)
+++ trunk/mapbender/http/javascripts/geometry.js	2010-03-19 14:37:29 UTC (rev 5813)
@@ -1791,12 +1791,11 @@
 	 * @param {Float} y y coordinate within the map frame
 	 */
 	var displayIcon = function (url, x, y, offsetX, offsetY, width, height) {
-
-		if (typeof offsetX !== "number") {
+		if (typeof offsetX !== "number" || isNaN(offsetX)) {
 			offsetX = -40;
 		}
 
-		if (typeof offsetY !== "number") {
+		if (typeof offsetY !== "number" || isNaN(offsetY)) {
 			offsetY = -40;
 		}
 //		if(ie){



More information about the Mapbender_commits mailing list