1
嗨下面的代碼給出了地方搜索,但它顯示我想在下面的代碼infobox..the通過DR.Molle谷歌的地方阿比PlaceDetails
http://jsfiddle.net/doktormolle/C5ZtK/
isprovided地方的完整細節唯一名稱 下面是提取placedetails的代碼,但不能讓它工作
var request = { reference: place.reference };
service.getDetails(request, function(details, status) {
google.maps.event.addListener(marker, 'click', function() {
infowindow.setContent(details.name + "<br />" + details.formatted_address +"<br />" + details.website + "<br />" + details.rating + "<br />" + details.formatted_phone_number);
infowindow.open(map, this);
});
});
}
我檢查了開發者頁面,但不能從中獲得太多的任何幫助將不勝感激
檢查出[地方搜索示例](HTTPS ://google-developers.appspot.com/maps/documentation/javascript/examples/place-search)和[properties](https:// develope由PlaceResult對象返回的rs.google.com/maps/documentation/javascript/places#place_search_results)。您應該可以修改示例以適合您的需求。 –