Giter Club home page Giter Club logo

Comments (6)

imran23 avatar imran23 commented on July 20, 2024 1

I was using this directive and my client was being billed $$$$$ since every keystroke is billed. I had to ditch this directive and write my own service that utilizes AutocompleteService. If you plan to go that route, I would also suggest using "offset". The "offset" property tells the service to start making API calls after n number of characters have been typed. Using AutocompleteService gives you more control over when to make an API call. You also write code to display the list of returned addresses.

from ngx-google-places-autocomplete.

official-aniketpatil avatar official-aniketpatil commented on July 20, 2024

Attention needed to this issue.

from ngx-google-places-autocomplete.

danilopolani avatar danilopolani commented on July 20, 2024

I guess there's a lot of work to do about this, because:

  1. You have to replace Autocomplete with AutocompleteService
  2. You have to listen to keypress/keyup/keydown event from native element in order to call the AutocompleteService
  3. Build a function to show the results, hoping the one provided by Google example is correctly working. As I see online it seems it's not built to provide a "suggestion" system for inputs, because you need to create the whole "popup" under the input, manage clicks and so on
  4. Provide the token to use it in the placeDetail() request

from ngx-google-places-autocomplete.

danilopolani avatar danilopolani commented on July 20, 2024

Thank you Imran, I hate the fact that you have to write your own callback to render the results. Why tf Google doesn't implement token for Autocomplete I really don't know

from ngx-google-places-autocomplete.

skynet2 avatar skynet2 commented on July 20, 2024

As far as that library is just a wrapper for google places autocomplete, it doesn`t use session tokens.
But you should be able to use fields property for customization #36

from ngx-google-places-autocomplete.

mikeysteele avatar mikeysteele commented on July 20, 2024

According to this: https://developers.google.com/maps/documentation/javascript/places-autocomplete#session_tokens session tokens are automatically handled by the widget. So in that case this directive is using session tokens.

from ngx-google-places-autocomplete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.