2016-01-11 57 views
0

我使用谷歌地圖API,它適用於除一個特定地址以外的所有地址。這是「99p商店19-20市場Wisbech PE13 1DZ」。當使用谷歌地圖我可以找到它,但使用js api它說'零結果'。谷歌地圖API找不到一個特定的地址

我的代碼:

function mapsSetMark(map, address) { 
var geocoder = new google.maps.Geocoder(); 
geocoder.geocode({'address': address}, function (results, status) { 
    if (status === google.maps.GeocoderStatus.OK) { 
     map.setZoom(13); 
     map.setCenter(results[0].geometry.location); 
     var marker = new google.maps.Marker({ 
      map: map, 
      position: results[0].geometry.location 
     }); 
    } else { 
     console.log('Geocode was not successful for the following reason: ' + status); 
    } 
}); 
} 

回答

3

「99便士店19-20市場廣場威茲比奇PE13 1DZ」 是一個地方沒有一個郵政地址。該​​

它可以找到 「19-20市場廣場威茲比奇PE13 1DZ」

找到 「99便士店19-20市場廣場威茲比奇PE13 1DZ」 使用Places API Library