Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can be this gem used without specification of country? #20

Open
Jirka1111 opened this issue Sep 22, 2016 · 3 comments
Open

Can be this gem used without specification of country? #20

Jirka1111 opened this issue Sep 22, 2016 · 3 comments

Comments

@Jirka1111
Copy link

Can be this gem used without specification of country? #

@kristianmandrup
Copy link
Owner

You can try ;) Read the gmaps API, tweak the gem as you like and make a PR

@jkras
Copy link

jkras commented Oct 15, 2016

To clarify, this is a workaround to achieve the desired functionality from @Jirka1111's question. This removes the ability to specify a region, and restrict results so would probably not be suitable for a PR.

If you reverse this commit you can achieve typeahead for any country.

To test locally, I unpacked the gem using

gem unpack gmaps-autocomplete-rails

Then modified gmaps-autocomplete-rails-0.2.0/vendor/assets/javascripts/gmaps-auto-complete.coffee per the commit above

Then changed the entry in my gemfile to point to the local gem (just to test)

gem 'gmaps-autocomplete-rails', :path => '~/workspace/gmaps-autocomplete-rails-0.2.0'

Then

bundle install

Finally, remove the region line from the autoCompleteInit method

@kristianmandrup
Copy link
Owner

You are welcome to make a PR that properly allows for both modes ;)
You are also very welcome to clean up the javascript, use ES classes and split functionality up instead of having it all in one big master class...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants