Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

small fix

  • Loading branch information...
commit 2356d64f91d2bfafd7d112d089bca88d167431ab 1 parent 0065844
@kristianmandrup authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 vendor/assets/javascripts/gmaps-autocomplete.js
View
16 vendor/assets/javascripts/gmaps-autocomplete.js
@@ -213,13 +213,19 @@ var GmapsAutoComplete = {
autoCompleteInit: function (opts) {
opts = opts || {};
this.region = opts['region'] || 'DK';
+ // console.log('inputField', this.inputField);
+
+ var self = this;
$(this.inputField).autocomplete({
// source is the list of input options shown in the autocomplete dropdown.
// see documentation: http://jqueryui.com/demos/autocomplete/
- source: this.autoCompleteSource,
+ source: self.autoCompleteSource,
// event triggered when drop-down option selected
- select: this.autoCompleteSelect
+ select: function(event,ui){
+ self.updateUI( ui.item.value, ui.item.geocode.geometry.location )
+ self.updateMap( ui.item.geocode.geometry )
+ }
});
// triggered when user presses a key in the address box
@@ -239,12 +245,6 @@ var GmapsAutoComplete = {
},
// self grants access to caller scope
- autoCompleteSelect: function(event,ui){
- self.updateUI( ui.item.value, ui.item.geocode.geometry.location )
- self.updateMap( ui.item.geocode.geometry )
- },
-
- // self grants access to caller scope
autoCompleteSource: function(request,response) {
// https://developers.google.com/maps/documentation/geocoding/#RegionCodes
var region_postfix = ''
Please sign in to comment.
Something went wrong with that request. Please try again.