react-places-autocomplete
react-places-autocomplete copied to clipboard
Reduce Api Calls
Google autocomplete gives us placeId, Latitude &Longitude on selecting the suggestion itself. But in this package we are manually making another call to geocode the address.
There is a placeId
passed back in the onSelect
handler, but I don't see long/lats anywhere in the suggestion
object though. Are you able to point out where/when you get it during auto complete?
+1 Google has kicked in with new billing policy, this one becomes pricy now :)
@hibiken Hello! Any updates on that? ) Or it's working now only on bought acc in Google, not for free? (demo works fine)
i completely agree, it is making api call twice for geocoding, whereas place api does the geocoding implicitly now ..
ill try to create a fix and send PR if its works..
@m-nathani Can you elaborate? Which request is it doing twice and how could this be solved?
based on googles documentation to group requests, you need to specify a session_id, so it groups up the calls