Closed danil-z closed 11 years ago
I think the following tweak could solve the problem, passing in the current GmapsCompleter
instance as the eventData argument.
# triggered when user presses a key in the address box
$(self.inputField).bind 'keydown', @, @keyDownHandler
# autocomplete_init
keyDownHandler: (event, completer) ->
if (event.keyCode == 13)
completer.geocodeLookup 'address', $(@inputField).val(), true
Look into http://api.jquery.com/bind/ to see how to use it correctly.
Please feel free to improve the basic structure of the javascript. I could use some love for sure, fx by using more classes, diving by functionality such as logging, errors, event handlers etc. Thanks!
Also improve the README as you see fit, not very clear (a bit confusing) IMO. Simplify! I think the Coffeescript approach using class instances should be the only option moving forward ;)
Cheers!
I just released a new version 1.3 which should fix the problem and make it much easier to customise, much better README etc. Hope you find it useful. Cheers!
Could not find gem 'gmaps-autocomplete-rails (>= 0.1.3) ruby' in the gems available on this machine.
tried to use github also give me an error: Could not find gem 'gmaps-autocomplete-rails (>= 0.1.3) ruby' in git://github.com/kristianmandrup/gmaps-autocomplete-rails.git (at master). Source contains 'gmaps-autocomplete-rails' at: 0.1.2.1
third line throws an error...
i'm using coffee script
why does this happen?
debug info