admin管理员组

文章数量:1425701

When I enter the location details in the google API developer page, the city name is missing from the results.

The Location details are "Canarsie, Brooklyn, NY, United States".

I entered the details in the form appearing in the following link.

But city name is missing from it. This doesn't happen for all the locations. It only happens for some locations. Please help me to find a solution.

When I enter the location details in the google API developer page, the city name is missing from the results.

The Location details are "Canarsie, Brooklyn, NY, United States".

I entered the details in the form appearing in the following link.

https://developers.google./maps/documentation/javascript/examples/places-autoplete-addressform

But city name is missing from it. This doesn't happen for all the locations. It only happens for some locations. Please help me to find a solution.

Share Improve this question asked Jun 27, 2017 at 7:26 Nithinkumar CNNithinkumar CN 3271 gold badge5 silver badges19 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

Address ponent type for "city" varies across regions, specially in New York.

For more details, see paragraph right under the form, in https://developers.google./maps/documentation/javascript/examples/places-autoplete-addressform

In my case it was because of it stopped sending CITY under LOCALITY type but just one from sublocality_level_1, sublocality, political types.

I notice now, that city is working under LOCALITY only when you fill name of city to search input.

本文标签: javascriptWhy city name missing for some locations from Google Maps API resultStack Overflow