Changes for page Cartography
on 2015/06/02 14:33
on 2015/06/02 15:00
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -40,9 +40,6 @@ 40 40 layer.points = []; 41 41 layer.layers = []; 42 42 43 -var centerX = 0; 44 -var centerY = 0; 45 -var nb = 0; 46 46 var flt = new Filter("seItem"); 47 47 48 48 var iter = flt.search(); ... ... @@ -51,17 +51,8 @@ 51 51 var item = iter.next(); 52 52 var pos = item.seGeoPosition; 53 53 54 - if(pos != null) { 55 - if(nb == 0) { 56 - centerX = pos.x; 57 - centerY = pos.y; 58 - nb = 1; 59 - } else { 60 - centerX = (pos.x + nb * centerX) / ( nb+1 ); 61 - centerY = (pos.y + nb * centerY) / ( nb+1 ); 62 - nb ++; 63 - } 64 - } 51 + //add the item on the map, at the position specified 52 + layer.points.push({pos:pos }); 65 65 } 66 66 map.layers.push(layer); 67 67