ここにfunction findPlaces
、ボックスなどの場所のオブジェクトを検索するコードがあります。
function findPlaces(boxes,searchIndex) {
var request = {
bounds: boxes[searchIndex],
types: ["museum"]
};
これはうまくいきますが、今...
リスト/メニューの値でこのタイプを変更したいので、次のようにします。
//JS CODE
function findPlaces(boxes,searchIndex) {
var request = {
bounds: boxes[searchIndex],
types: document.getElementById("select").selectedIndex
};
および HTML コード:
<label for="select"></label>
<select name="select" id="select">
<option>restaurant</option>
<option>bar</option>
<option>museum</option>
<option>gas_station</option>
</select>
このコードはリスト/メニューから値を取得せず、新しい値で関数を実行しません
どうすればそれを解決できますか?