最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Why city name missing for some locations from Google Maps API result? - Stack Overflow

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论