Google maps 是否可以使用谷歌地图api或bing地图api获取地址附近的信息?

Google maps 是否可以使用谷歌地图api或bing地图api获取地址附近的信息?,google-maps,google-maps-api-3,bing-maps,Google Maps,Google Maps Api 3,Bing Maps,是否可以使用谷歌地图API或Bing地图API获取邻居?例如,有可能获得“金融区”邻居的价值来搜索旧金山附近的住址吗?如果没有,是否有其他在线资源?谢谢 Google Places API使您能够获取邻居信息。 但从API获得的信息必须用于谷歌地图 你可以在谷歌上下载这个例子 在HTML表格中添加 <tr> <td class="label">Neighbourhood</td> <td class="wideField" colsp

是否可以使用谷歌地图API或Bing地图API获取邻居?例如,有可能获得“金融区”邻居的价值来搜索旧金山附近的住址吗?如果没有,是否有其他在线资源?谢谢

Google Places API使您能够获取邻居信息。 但从API获得的信息必须用于谷歌地图


你可以在谷歌上下载这个例子

在HTML表格中添加

 <tr>
    <td class="label">Neighbourhood</td>
    <td class="wideField" colspan="3"><input class="field"
          id="neighborhood" disabled="true"></input></td>
 </tr>

邻里

您可以在输入地址后看到显示的邻域信息

是,邻域作为地理编码API的一部分返回到
address\u components[]
数组中

谷歌有一个展示地理编码API的平台。
邻里区
字段可用于出现在有邻里区的城市中的地方

下面是一个简单的示例,使用

这将打印以下内容:

[{'address_components': [{'long_name': '3027',
                          'short_name': '3027',
                          'types': ['street_number']},
                         {'long_name': '16th Street',
                          'short_name': '16th St',
                          'types': ['route']},
                         {'long_name': 'Mission District',
                          'short_name': 'Mission District',
                          'types': ['neighborhood', 'political']},
                         {'long_name': 'San Francisco',
                          'short_name': 'SF',
                          'types': ['locality', 'political']},
                         {'long_name': 'San Francisco County',
                          'short_name': 'San Francisco County',
                          'types': ['administrative_area_level_2',
                                    'political']},
                         {'long_name': 'California',
                          'short_name': 'CA',
                          'types': ['administrative_area_level_1',
                                    'political']},
                         {'long_name': 'United States',
                          'short_name': 'US',
                          'types': ['country', 'political']},
                         {'long_name': '94110',
                          'short_name': '94110',
                          'types': ['postal_code']},
                         {'long_name': '3402',
                          'short_name': '3402',
                          'types': ['postal_code_suffix']}],
  'formatted_address': '3027 16th St, San Francisco, CA 94110, USA',
  'geometry': {'bounds': {'northeast': {'lat': 37.764927, 'lng': -122.4201635},
                          'southwest': {'lat': 37.7646504,
                                        'lng': -122.4203792}},
               'location': {'lat': 37.7647804, 'lng': -122.4202906},
               'location_type': 'ROOFTOP',
               'viewport': {'northeast': {'lat': 37.7661376802915,
                                          'lng': -122.4189223697085},
                            'southwest': {'lat': 37.76343971970851,
                                          'lng': -122.4216203302915}}},
  'place_id': 'ChIJxT0SpyN-j4ART07xF7G8NGE',
  'types': ['premise']}]

有关更多信息,请咨询官方。

像这样的评论&没有提供足够细节来重现您的问题的否决票,看起来并不好@Hamdan
import googlemaps

API_KEY = "YOUR_API_KEY"
gmaps = googlemaps.Client(key=API_KEY)
print gmaps.geocode('3027 16th St, San Francisco, CA 94103, United States')
[{'address_components': [{'long_name': '3027',
                          'short_name': '3027',
                          'types': ['street_number']},
                         {'long_name': '16th Street',
                          'short_name': '16th St',
                          'types': ['route']},
                         {'long_name': 'Mission District',
                          'short_name': 'Mission District',
                          'types': ['neighborhood', 'political']},
                         {'long_name': 'San Francisco',
                          'short_name': 'SF',
                          'types': ['locality', 'political']},
                         {'long_name': 'San Francisco County',
                          'short_name': 'San Francisco County',
                          'types': ['administrative_area_level_2',
                                    'political']},
                         {'long_name': 'California',
                          'short_name': 'CA',
                          'types': ['administrative_area_level_1',
                                    'political']},
                         {'long_name': 'United States',
                          'short_name': 'US',
                          'types': ['country', 'political']},
                         {'long_name': '94110',
                          'short_name': '94110',
                          'types': ['postal_code']},
                         {'long_name': '3402',
                          'short_name': '3402',
                          'types': ['postal_code_suffix']}],
  'formatted_address': '3027 16th St, San Francisco, CA 94110, USA',
  'geometry': {'bounds': {'northeast': {'lat': 37.764927, 'lng': -122.4201635},
                          'southwest': {'lat': 37.7646504,
                                        'lng': -122.4203792}},
               'location': {'lat': 37.7647804, 'lng': -122.4202906},
               'location_type': 'ROOFTOP',
               'viewport': {'northeast': {'lat': 37.7661376802915,
                                          'lng': -122.4189223697085},
                            'southwest': {'lat': 37.76343971970851,
                                          'lng': -122.4216203302915}}},
  'place_id': 'ChIJxT0SpyN-j4ART07xF7G8NGE',
  'types': ['premise']}]