編集:問題は解決しました このような変数を使用して型を割り当てようとしています
check = [];
if($("#transport").attr("checked"))
check.push('airport','bus_station','train_station','taxi_stand','travel_agency');
if($("#bars").attr("checked"))
check.push('bar','restaurant');
if($("#tourist").attr("checked"))
check.push('art_gallery','campground','museum','aquarium','zoo','library','amusement_park','park');
if($("#shopping").attr("checked"))
check.push('shopping_mall','shoe_store','jewelry_store','grocery_or_supermarket','furniture_store','electronics_store','clothing_store','book_store');
var tmp_types = "";
for(i=0;i<1;i++)
{
tmp_types += '"'+check[i]+'"';
}
var request = {
location: latlng,
radius: '50000',
types: [ tmp_types ]
};
service = new google.maps.places.PlacesService(map);
service.nearbySearch(request, callback);
しかし、うまくいきません...誰か助けてくれませんか...ありがとう
解決策: tmp_types の代わりに check を使用し、角かっこを削除します..このタイプのように: check.. Bruno に感謝します