jquery - Google Maps API v3 对企业名称进行地理编码

标签 jquery google-maps-api-3 geocoding

是否可以使用企业名称而不是确切的街道地址进行地理编码?以下地理编码请求返回 0 个结果。我希望能够发送公司名称、城市和州并检索纬度和经度。这是我到目前为止所拥有的:

var business = "Neighborhood Theatre, Charlotte, NC 28205";
geocoder.geocode({'address' : business, 'region' : 'us'}, function(results, status) {
    console.log(status);
});

最佳答案

不,Geocoding is specifically targeted at postal addresses.

Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739),

要对公司名称进行地理定位,您需要使用类似 Places API 的名称。

The Google Places JavaScript library's functions enable your application to search for Places (defined in this API as establishments, geographic locations, or prominent points of interest) contained within a defined area, such as the bounds of a map, or around a fixed point.

关于jquery - Google Maps API v3 对企业名称进行地理编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14024540/

相关文章:

java - 更改 Google Place Picker Appbar 文本颜色

mysql - 在mysql中查询ip范围的最有效方法

android - 有什么方法可以异步调用 Geocoder.getFromLocation 吗?

javascript - 向 <li> 标签添加事件状态

jquery - 将客户端事件绑定(bind)到不同的函数

javascript - 我已经声明了一个空元素数组,如何检查哪些元素保持为空?

android - 设置 InfoWindowAdapter 仅显示单击第一个标记的信息

jquery - 附加 jQuery 1.9.1 后按钮不起作用

javascript - 谷歌地图 V3 : Position a Clear X on input search

lucene - 使用地名通过Elasticsearch进行地理位置定位(地理编码)