You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by si...@apache.org on 2009/12/18 07:16:46 UTC

svn commit: r892149 - in /labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps: mapDisplay.js tableToMap.js

Author: simoneg
Date: Fri Dec 18 06:16:45 2009
New Revision: 892149

URL: http://svn.apache.org/viewvc?rev=892149&view=rev
Log:
LABS-503 : Mappable smart list supports links and a small fix on map centering

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

Modified: labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/mapDisplay.js
URL: http://svn.apache.org/viewvc/labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/mapDisplay.js?rev=892149&r1=892148&r2=892149&view=diff
==============================================================================
--- labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/mapDisplay.js (original)
+++ labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/mapDisplay.js Fri Dec 18 06:16:45 2009
@@ -93,8 +93,8 @@
 };
 
 MagMap.prototype.recenter = function() {
+	  var mapbounds = null;
 	  if (this.options.autocenter) {
-		  var mapbounds = null;
 		  for (var geomkey in this.geometries) {
 			  if (mapbounds == null) mapbounds = new GLatLngBounds();
 			  var geom = this.geometries[geomkey];
@@ -109,8 +109,9 @@
 				  }
 			  }
 		  }
-		  if (mapbounds != null)
-			  this.map.setCenter(mapbounds.getCenter(), this.map.getBoundsZoomLevel(mapbounds)); 
+	  }
+	  if (mapbounds != null) {
+		  this.map.setCenter(mapbounds.getCenter(), this.map.getBoundsZoomLevel(mapbounds)); 
 	  } else {
 		  var mapcenter = null;
 		  if (this.options.center) {

Modified: labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/tableToMap.js
URL: http://svn.apache.org/viewvc/labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/tableToMap.js?rev=892149&r1=892148&r2=892149&view=diff
==============================================================================
--- labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/tableToMap.js (original)
+++ labs/magma/trunk/website-maps-google/src/main/resources/org/apache/magma/website/maps/tableToMap.js Fri Dec 18 06:16:45 2009
@@ -44,8 +44,9 @@
 		var shapes = $('td.MagmaMappedShapes', this).text();
 		if (shapes == '') return;
 		var txt = $('td:not(.MagmaMappedShapes)', this).text();
+		var link = $('td a', this).attr('href');
 		try {
-			magmap.parseGeometriesWithOptions(shapes, {description: txt});
+			magmap.parseGeometriesWithOptions(shapes, {description: txt, link: link});
 		} catch (e) {}
 	});
 	magmap.recenter();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org