我使用谷歌地圖web服務API爲出租車站點創建了一個自動建議結果,但是某些位置沒有正確返回或者不一致。例如,如果我搜索「米蘭中央火車站」,我會收到正確的位置,火車圖標等。如果我搜索「羅馬Termini火車站」(意大利第一大火車站),我會收到火車站的通用地址,業務通用圖標..有人知道如何操縱響應來顯示分離的預測?在谷歌的羅馬特米尼站輸入的地圖是預測不同的建議谷歌地圖網絡服務Api
與谷歌響應
<script>
string='roma termini station';
service = new google.maps.places.PlacesService(document.getElementById('GoogleMapService'));
var request = {
query: string,
};
service.textSearch(request, function(result){
console.log(JSON.stringify(result));
});
</script>
感謝xomena,也許在未來的未來谷歌將改善搜索缺少物品 – Cristian