[pLog-svn] r4744 - plog/trunk/js/location

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sat Feb 17 13:23:04 EST 2007


Author: oscar
Date: 2007-02-17 13:23:04 -0500 (Sat, 17 Feb 2007)
New Revision: 4744

Modified:
   plog/trunk/js/location/location.js
Log:
Center the map and zoom in around the marker when calling the displayLocation() method.

Modified: plog/trunk/js/location/location.js
===================================================================
--- plog/trunk/js/location/location.js	2007-02-17 17:52:17 UTC (rev 4743)
+++ plog/trunk/js/location/location.js	2007-02-17 18:23:04 UTC (rev 4744)
@@ -434,8 +434,14 @@
  */
 Lifetype.UI.Location.prototype.displayLocation = function( loc )
 {
+	// add the marker
 	marker = this._genMarker( loc );
 	this.map.addOverlay( marker );
+	
+	// center the map around the marker
+	coords = loc.latlong.split(",");	
+	this.map.setCenter( new GLatLng( coords[0], coords[1] ));
+	this.map.setZoom( 13 );
 }
 
 ///////////////////////////////////////////////////



More information about the pLog-svn mailing list