[Jifty-commit] r3643 - in jifty/trunk: share/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Jul 10 00:15:52 EDT 2007


Author: clkao
Date: Tue Jul 10 00:15:50 2007
New Revision: 3643

Modified:
   jifty/trunk/lib/Jifty/Plugin/GoogleMap/Widget.pm
   jifty/trunk/share/web/static/js/google_map.js

Log:
Minor fine tune.

Modified: jifty/trunk/lib/Jifty/Plugin/GoogleMap/Widget.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/GoogleMap/Widget.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/GoogleMap/Widget.pm	Tue Jul 10 00:15:50 2007
@@ -37,7 +37,7 @@
     ($x, $y) = (-71.2, 42.4) if $use_default;
     my $zoom_level = $use_default ? 1 : 13;
 
-    Jifty->web->out(qq{<div @{[$self->_widget_class]} id="@{[$self->element_id]}" style="left: 200px; width: 200px; height: 200px"></div>});
+    Jifty->web->out(qq{<div @{[$self->_widget_class]} id="@{[$self->element_id]}" style="left: 200px; width: 250px; height: 250px"></div>});
     Jifty->web->out(qq{<script type="text/javascript">
 (function() {
 if (GBrowserIsCompatible()) {

Modified: jifty/trunk/share/web/static/js/google_map.js
==============================================================================
--- jifty/trunk/share/web/static/js/google_map.js	(original)
+++ jifty/trunk/share/web/static/js/google_map.js	Tue Jul 10 00:15:50 2007
@@ -43,11 +43,12 @@
 	  element.setAttribute('onsubmit','_handle_search(this._map, this.firstChild.value); return false;');
 	  var field= document.createElement('input');
 	  field.setAttribute('type', 'text');
+	  field.style.width = '150px';
 	  element.appendChild(field);
 	  var submit= document.createElement('input');
 	  submit.setAttribute('type', 'submit');
 	  element.appendChild(submit);
-	  map.openInfoWindow(map.getCenter(), element);
+	  map.openInfoWindow(map.getCenter(), element, { maxWidth: 100 } );
   });
 
   map.getContainer().appendChild(container);
@@ -66,7 +67,8 @@
 				      map.removeOverlay(map._jifty_location);
 				      map._jifty_location = new GMarker(new GLatLng(point[1], point[0]));
 				      map.addOverlay(map._jifty_location);
-				      map.setCenter(map._jifty_location.getPoint());
+				      map.closeInfoWindow();
+				      map.setCenter(map._jifty_location.getPoint(), 8+result.Placemark[0].AddressDetails.Accuracy);
 				  }
 				  else {
 				      alert('not yet');


More information about the Jifty-commit mailing list