Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix `options.initial.center` issue in minified version as well.

  • Loading branch information...
commit 24de5bb26ea95834a4a79658ea6ceb92609f0a47 1 parent ebffc58
@tristandunn authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  jquery.auto-geocoder.min.js
View
2  jquery.auto-geocoder.min.js
@@ -1,4 +1,4 @@
-(function(e){var i=new google.maps.Geocoder;e.fn.autoGeocoder=function(b){var a=e.fn.autoGeocoder,b=e.extend(!0,{},a.defaults,b||{}),a=b.setup||a.base;for(property in a)for(var d=a[property],c=0,f=d.length;c<f;c++)d[c].call(this,b);return this.trigger("auto-geocoder.initialize")};e.fn.autoGeocoder.base={initialize:[function(b){b.initial.center=google.maps.LatLng.call(this,b.initial.center);this.on("auto-geocoder.initialize",function(){e(this).trigger("auto-geocoder.createMap").trigger("auto-geocoder.onKeyUp")})}],
+(function(e){var i=new google.maps.Geocoder;e.fn.autoGeocoder=function(b){var a=e.fn.autoGeocoder,b=e.extend(!0,{},a.defaults,b||{}),a=b.setup||a.base;for(property in a)for(var d=a[property],c=0,f=d.length;c<f;c++)d[c].call(this,b);return this.trigger("auto-geocoder.initialize")};e.fn.autoGeocoder.base={initialize:[function(b){b.initial.center=new google.maps.LatLng(b.initial.center[0],b.initial.center[1]);this.on("auto-geocoder.initialize",function(){e(this).trigger("auto-geocoder.createMap").trigger("auto-geocoder.onKeyUp")})}],
createMap:[function(b){this.on("auto-geocoder.createMap",function(){var a=e(this),d=e("<div>",{"class":b.className}),c=b.position;if("before"==c||"after"==c)a[c](d);else e(c).append(d);a.on("keyup.auto-geocoder",function(){a.trigger("auto-geocoder.onKeyUp")});this.map=new google.maps.Map(d[0],b.initial)})}],onKeyUp:[function(b){this.on("auto-geocoder.onKeyUp",function(){var a=this,d=e(a),c=e.trim(d.val()).replace(/\s+/g," ").toLowerCase(),f=this.timeout,g=this.previousAddress;f&&clearTimeout(f);g&&
g==c||(""==c?d.trigger("auto-geocoder.onGeocodeResult",[[],""]):this.timeout=setTimeout(function(){a.previousAddress=c;i.geocode({address:c},function(a,b){d.trigger("auto-geocoder.onGeocodeResult",[a,b])})},b.delay))})}],onGeocodeResult:[function(b){this.get(0).marker=new google.maps.Marker;this.on("auto-geocoder.onGeocodeResult",function(a,d,c){var a=this.map,f=this.marker;if(c==google.maps.GeocoderStatus.OK){var g=d[0].geometry,h=g.location;"auto"==b.success.zoom?a.fitBounds(g.viewport):(a.setZoom(b.success.zoom),
a.setCenter(h));f.setPosition(h);f.setMap(a);e(this).trigger("auto-geocoder.onGeocodeSuccess",[d,c])}else g=b.initial,f&&f.setMap(null),a.setZoom(g.zoom),a.setCenter(g.center),e(this).trigger("auto-geocoder.onGeocodeFailure",[d,c])})}],onGeocodeSuccess:[],onGeocodeFailure:[]};e.fn.autoGeocoder.defaults={className:"jquery-auto-geocoder-map",position:"after",delay:500,success:{zoom:"auto"},initial:{zoom:1,center:[34,0],draggable:!1,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!1}}})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.