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

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

有沒(méi)有一種方法可以將API數(shù)據(jù)轉(zhuǎn)換為Mapbox圖層?

有沒(méi)有一種方法可以將API數(shù)據(jù)轉(zhuǎn)換為Mapbox圖層?

慕妹3146593 2021-05-04 21:41:06
我下面有一個(gè)回調(diào)函數(shù),該函數(shù)能夠從Eventbrite API生成數(shù)據(jù)。目前,此功能可以通過(guò)“新標(biāo)記”方法在我的Mapbox地圖上生成標(biāo)記。但是,我想通過(guò)“ Mapbox addLayer”方法將這些數(shù)據(jù)生成到地圖上的圖層中,而不是使用標(biāo)記。    callbackEventbrite(function(result){    const keys = Object.values(result);    for(const key of keys){        geojson = {            type: 'featureCollection',            features: [{                type: 'feature',                geometry: {                    type: 'Point',                    coordinates: [key.venue.longitude, key.venue.latitude]                }            }]        }        eventInfo.push(            {"longitude": key.venue.longitude , "latitude": key.venue.latitude , "name": key.name.text, "venue": key.venue.name, "date": key.start.local, "category": key.category_id}        );    }});我基本上想要這個(gè),它根據(jù)幾何的坐標(biāo)在地圖上生成符號(hào),但是使用API數(shù)據(jù)。map.addLayer({        "id": "locations",        "type": "symbol",        "source": {            "type": "geojson",            "data": {                "type": "FeatureCollection",                "features": [                    {                      "type": "Feature",                      "properties": {                        "Title": "The Congress Inn",                        "Description": "Pub located in Longton",                        "Type": "Pub",                        "Address": "14 Sutherland Rd, Stoke-on-Trent ST3 1HJ",                        "Longitude": 2.1316,                        "Latitude": 52.9878,                        "icon": "bar"                      },                      "geometry": {                        "coordinates": [                          -2.131836,                          52.987238                        ],                        "type": "Point"                      }                    },任何幫助深表感謝!謝謝你
查看完整描述

1 回答

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

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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