Reputation: 98
I try to get Place Id by Google geocode API for the following address:
Tel Aviv Street 2, Ness Ziona, Israel
By this link:
the Place Id is
"EizXqtecINeQ15HXmdeRIDIsINeg16Eg16bXmdeV16DXlCwg15nXqdeo15DXnA"
which is wrong and related to similar address:
Ness Tsiyona St 2, Tel Aviv-Yafo, Israel.
You can check here.
From other side, if I use this Google site I receive correct Place Id.
Any idea for the reason of such inconsistency and how I can avoid it? I tried different variations of address and different house numbers and the same problem appears as well.
Thanks!
Upvotes: 1
Views: 569
Reputation: 1094
as explained here: https://developers.google.com/places/place-id#id-overview
you could have 2 types of places_id, one shorter staring with Ch like:
ChIJrTLr-GyuEmsRBfy61i59si0
and a longer like the one you are using starting with E like:
EisxMyBNYXJrZXQgU3RyZWV0LCBXaWxtaW5ndG9uLCBOQyAyODQwMSwgVVNB
to summarize it, when is the longer one that means that is interpolated, that means that google try to guess(calculate) where the address is. My point with this is that the shorter one is more accurate and the longer one not very viable.
I recreated your request both in geocoding and in places and I see that the second result drops the correct address: Tel Aviv St 2, Ness Ziona, Israel(but still with the longer place_id).
Should I suggest reporting this as a bug in the correct API in the Issue Tracker.
https://issuetracker.google.com
Happy coding :)
Upvotes: 2