Same same but different

Written by on July 15, 2014, 7:20 am

I have done a bit more digging into issues I have been having with the places API and discovered that Google has deprecated (as of 24th June) the reference property of autocomplete responses (and place detail requests) and moved to a new place_id parameter. The semantics of these parameters are the same so I didn't have to modify much code (just change the names) and it looks like the new ids are working better than the old ones.

I hoped that all the problems I have been seeing would go away with the new ids, and some certainly have (Bridge St Sydney seems to work now), but have found there are still erroneous suggestions coming back in autocomplete.

If you search for "60 Pitt St" while in the Sydney CBD the first suggestion you get back is "60 Pitt St, Sydney" followed by "60 Pitt St, Parramatta" and then "60 Pitt St, Redfern". There are a couple of issues with this:

  • - Why is Parramatta (23 km) presented before Redfern (3km)?
  • - When I resolve the place_id for the first result, I would expect 60 Pitt St in Sydney CBD. Instead, I get the location in Redfern (same lat, lng as the third result).

So still somewhat dissatisfied with the data I am getting back from the Places API, but getting closer.

Permalink - Tags: Development