Permalink
Browse files

added a resize option when the map is hidden

invoke with $elem.addresspicker('reload')
make sure that img max-widths are reset to inherit since Bootstrap sets them to 100% when loaded: #map-div-id img {max-width:inherit;}
  • Loading branch information...
elmariachi111 committed Dec 2, 2012
1 parent f921c6b commit 861ee8bde3bdf09365963d06f7bbe37359c44c5c
Showing with 9 additions and 5 deletions.
  1. +9 −5 src/jquery.addresspicker.js
@@ -5,7 +5,12 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
-
+ * http://docs.jquery.com/UI/Progressbar
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ * jquery.ui.autocomplete.js
*/
(function( $, google ) {
@@ -33,9 +38,9 @@
},
reloadPosition: function() {
- this.gmarker.setVisible(true);
- this.gmarker.setPosition(new google.maps.LatLng(this.lat.val(), this.lng.val()));
- this.gmap.setCenter(this.gmarker.getPosition());
+ this.gmap.setCenter(this.gmarker.getPosition());
+ this.gmarker.setVisible(true);
+ google.maps.event.trigger(this.gmap, 'resize');
},
selected: function() {
@@ -46,7 +51,6 @@
this.geocoder = new google.maps.Geocoder();
var self = this;
-
this.$element.typeahead({
minLength:3,
delay:this.options.typeaheaddelay,

0 comments on commit 861ee8b

Please sign in to comment.