[Mapbender-commits] r6954 - branches/2.6/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Sep 28 09:14:26 EDT 2010


Author: tbaschetti
Date: 2010-09-28 13:14:26 +0000 (Tue, 28 Sep 2010)
New Revision: 6954

Modified:
   branches/2.6/http/javascripts/geometry.js
Log:
added toText() to point (backport from trunk)


Modified: branches/2.6/http/javascripts/geometry.js
===================================================================
--- branches/2.6/http/javascripts/geometry.js	2010-09-28 10:22:39 UTC (rev 6953)
+++ branches/2.6/http/javascripts/geometry.js	2010-09-28 13:14:26 UTC (rev 6954)
@@ -825,11 +825,14 @@
 				}
 
 				var currentPoint = currentLine.get(j);
-				text += currentPoint.x + " " + currentPoint.y
+				text += currentPoint.x + " " + currentPoint.y;
 			}
 
 			text += ")";
 		}
+		else if(this.geomType == geomType.point){
+			text = this.get(0).toText();
+		}
 		
 	}
 	return text;		
@@ -1206,6 +1209,14 @@
 				}				
 			}
 			break;
+		case geomType.point:
+			var point = this.get(0);
+			if(typeof(!point.z)) {
+				return "POINT(" +point.x + " " + point.y + ")";
+			}
+			else {
+				return "POINT Z (" + point.x + " " + point.y + " " + point.z + ")";
+			}
 	}
 	return text;
 };



More information about the Mapbender_commits mailing list