Reputation: 21
How do I go about getting the Google Maps API Place ID details corrected?
As an example, for the place_id = ChIJq-W618k0K4gRRJXspdvJ9ck
, I get the following Google Places API Web Service response:
"formatted_address" : "Toronto General Hospital, 200 Elizabeth Street, Toronto, ON M5G 2C4, Canada"
but it really should be returning:
"formatted_address" : "200 Elizabeth Street, Toronto, ON M5G 2C4, Canada"
The name of the building should not be included with the formatted address.
Upvotes: 0
Views: 1083
Reputation: 4865
Looks like you got that formatted address from the Geocoding API. This API does not have a "name"
field in the response, so the name of the hospital has nowhere to go but into the "formatted_address"
field:
formatted_address: "Toronto General Hospital, 200 Elizabeth Street, Toronto, ON M5G 2C4, Canada",
If you'd like to have the name and address in separate fields, send a Places API Details request:
formatted_address: "200 Elizabeth Street, Toronto, ON M5G 2C4, Canada",
name: "Toronto General Hospital",
You will get the name in the formatted address, even in Places API, if the Place ID represents a building (types: ["premise"]
):
formatted_address: "Hyman Soloway, 157 Laurier Ave E, Ottawa, ON K1N 1K5, Canada"
name: "Hyman Soloway"
If you find this is the case with a building that doesn't have a name, but the name actually is that of a business in that building, here's how to report this problem in Google Maps:
Upvotes: 1