第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

使用復(fù)選框過濾 Google 地圖標(biāo)記

使用復(fù)選框過濾 Google 地圖標(biāo)記

收到一只叮咚 2021-06-09 06:09:12
當(dāng)用戶選擇一個(gè)復(fù)選框并單擊“在地圖上顯示”時(shí),我試圖顯示某些標(biāo)記。選擇“高迪之旅”時(shí)應(yīng)顯示 2 個(gè)標(biāo)記,選擇“哥特式之旅”時(shí)應(yīng)顯示兩個(gè)不同的標(biāo)記。但是,它不會(huì)過濾 createMarkers() 函數(shù)中的結(jié)果,而是在單擊按鈕時(shí)顯示所有標(biāo)記。我不明白為什么它沒有過濾結(jié)果,我沒有收到任何錯(cuò)誤。<section>        <div class="container">            <h2>Choose your tour:</h2>            <div class="container" id="selectTour">                <div class="form-check-inline">                    <label class="form-check-label">                        <input type="checkbox" class="form-check-input" id="one">Gaudi Tour                    </label>                </div>                <div class="form-check-inline">                    <label class="form-check-label">                        <input type="checkbox" class="form-check-input" id="two">Gothic Tour                    </label>                </div>            </div>            <div class="container">                <button onclick="updateMarkers();">Show on Map</button>            </div>            <!--The Map-->            <div class="container">                <div id="map"></div>            </div>        </div>    </section>var map;var markers = [];//---------------------Data of Locations-----------------let locations = [{        name: 'one',        tour: 'gaudi',        coords: { lat: 41.403706, lng: 2.173504 },        content: 'google',    },    {        name: 'one',        tour: 'gaudi',        coords: { lat: 41.4145, lng: 2.1527 },        content: 'maps',    },    {        name: 'two',        tour: 'gothic',        coords: { lat: 41.3839, lng: 2.1821 },        content: 'are'    },    {        name: 'two',        tour: 'gothic',        coords: { lat: 41.3840, lng: 2.1762 },        content: 'annoying'    }];//---------------------Initializing Map-----------------function initMap() {    var mapOptions = {        center: new google.maps.LatLng(41.3851, 2.1734),        zoom: 12    };    map = new google.maps.Map(document.getElementById("map"), mapOptions);}任何建議都會(huì)有很大幫助。
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 159 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)