Author: simoneg
Date: Mon Feb 15 22:42:32 2010
New Revision: 910358

URL: http://svn.apache.org/viewvc?rev=910358&view=rev
Log:
Fixed a problem on routes, not keeping the shape between different edits

Modified:
    
labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/mapEditor.js

Modified: 
labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/mapEditor.js
URL: 
http://svn.apache.org/viewvc/labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/mapEditor.js?rev=910358&r1=910357&r2=910358&view=diff
==============================================================================
--- 
labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/mapEditor.js
 (original)
+++ 
labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/mapEditor.js
 Mon Feb 15 22:42:32 2010
@@ -359,11 +359,16 @@
 
 Geometry.prototype.serializeAdditional = function() {
        if (this.type == 'route') {
-               var calcovl = this.overlay.delegateOverlay;
-               for (var name in calcovl) {
-                       var sub = calcovl[name];
-                       if (sub && sub != null && sub['id'] != null && 
sub['levels'] != null && sub['numLevels'] != null && sub['points'] != null) {
-                               return "{zoomFactor: " + sub['zoomFactor'] + ", 
numLevels: " + sub['numLevels'] + ", levels:'" + 
sub['levels'].replace(/\\/g,"\\\\") + "', points:'" + 
sub['points'].replace(/\\/g,"\\\\") + "'}";
+               if (this.points) {
+                       var sub = this;
+                       return "{zoomFactor: " + sub['zoomFactor'] + ", 
numLevels: " + sub['numLevels'] + ", levels:'" + 
sub['levels'].replace(/\\/g,"\\\\") + "', points:'" + 
sub['points'].replace(/\\/g,"\\\\") + "'}";
+               } else {
+                       var calcovl = this.overlay.delegateOverlay;
+                       for (var name in calcovl) {
+                               var sub = calcovl[name];
+                               if (sub && sub != null && sub['id'] != null && 
sub['levels'] != null && sub['numLevels'] != null && sub['points'] != null) {
+                                       return "{zoomFactor: " + 
sub['zoomFactor'] + ", numLevels: " + sub['numLevels'] + ", levels:'" + 
sub['levels'].replace(/\\/g,"\\\\") + "', points:'" + 
sub['points'].replace(/\\/g,"\\\\") + "'}";
+                               }
                        }
                }
        }
@@ -693,14 +698,7 @@
 StatusControl.prototype.initialize = function(map) {
   var me = this;
   var status_div = $('<div style="color: gray; background: white; border: 1px 
solid gray; padding: 5px"></div>')[0];
-  alert("ciao");
   map.getContainer().appendChild(status_div);
-  //alert("Style : " + status_div.style.color);
-  //status_div.style.color = 'grey';
-  //status_div.style.background = 'white';
-  //status_div.style.border = '1px solid grey';
-  //status_div.style.padding = '5px';
-  //status_div.style.fontSize = '11px';
   status_div.innerHTML = 'Select geometries by clicking on them.';
   this.status_div = status_div;
   return this.status_div;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to