[英]Can't find point of interest with geocoding
I have a web app where I use javascript google geocoder: 我有一个网络应用程序,在其中使用javascript google geocoder:
var geocoder = new google.maps.Geocoder();
geocoder.geocode({ 'address': from }, function(results, status) {
var from_lat = results[0].geometry.location.lat();
var from_lng = results[0].geometry.location.lng();
});
It finds almost any address, but if I search for some points of interest, I get: ZERO_RESULTS in status. 它几乎可以找到任何地址,但是如果我搜索一些兴趣点,则会得到:状态为ZERO_RESULTS。 For example:
例如:
"Azrieli Center, Derech Menachem Begin, Tel Aviv-Yafo, Israel"
How can I change my code in order to find this kind of place? 我如何更改代码才能找到这种地方?
Businesses are excluded from Geocoding API, so you have to use a places library of Maps JavaScript API in order to find POI like this one. 地理编码API排除了企业,因此您必须使用Maps JavaScript API的地方信息库才能找到像这样的POI。
Please have a look at this example on jsbin: http://jsbin.com/jayabe/edit?html,output 请在jsbin上查看以下示例: http ://jsbin.com/jayabe/edit?html,输出
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.