diff --git a/.env.development b/.env.development index 110221d1..6962a04b 100644 --- a/.env.development +++ b/.env.development @@ -3,8 +3,8 @@ # REACT_APP_IMAGE_HOST = https://palnet-file.s3.ap-northeast-2.amazonaws.com/ -REACT_APP_HOST = http://pav.palntour.com:8080/ -REACT_APP_WS_HOST = ws://pav.palntour.com:8081/ws +REACT_APP_HOST = http://211.253.11.189:8080/ +REACT_APP_WS_HOST = ws://211.253.11.189:8081/ws REACT_APP_IMAGE_HOST = https://palnet-file.s3.ap-northeast-2.amazonaws.com/ # Naver Search API HOST diff --git a/src/components/map/geojson/airArea.json b/src/components/map/geojson/airArea.json index 443d59c0..3add1cc2 100644 --- a/src/components/map/geojson/airArea.json +++ b/src/components/map/geojson/airArea.json @@ -113,381 +113,6 @@ "type": "0001" } }, - { - "type": "Feature", - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [126.79372200000002, 37.642065321423125, 0], - [126.79556331708322, 37.6420525830803, 0], - [126.79740407139138, 37.64201437194515, 0], - [126.79924370032316, 37.641950699696444, 0], - [126.80108164162465, 37.64186158579482, 0], - [126.80291733356297, 37.64174705747672, 0], - [126.8047502150997, 37.641607149746044, 0], - [126.8065797260639, 37.64144190536327, 0], - [126.80840530732533, 37.64125137483235, 0], - [126.81022640096666, 37.64103561638503, 0], - [126.81204245045593, 37.64079469596291, 0], - [126.81385290081819, 37.64052868719711, 0], - [126.8156571988067, 37.6402376713855, 0], - [126.81745479307371, 37.63992173746762, 0], - [126.81924513434046, 37.63958098199724, 0], - [126.8210276755666, 37.63921550911257, 0], - [126.82280187211899, 37.63882543050407, 0], - [126.82456718193943, 37.63841086538005, 0], - [126.82632306571195, 37.63797194042983, 0], - [126.82806898702893, 37.63750878978467, 0], - [126.8298044125564, 37.637021554976386, 0], - [126.83152881219839, 37.636510384893676, 0], - [126.83324165926012, 37.635975435736206, 0], - [126.83494243061023, 37.635416870966395, 0], - [126.83663060684185, 37.63483486125903, 0], - [126.83830567243236, 37.63422958444861, 0], - [126.83996711590206, 37.63360122547451, 0], - [126.84161442997153, 37.632949976323914, 0], - [126.84324711171743, 37.632276035972694, 0], - [126.84486466272732, 37.631579610324025, 0], - [126.84646658925253, 37.6308609121449, 0], - [126.84805240236012, 37.63012016100053, 0], - [126.84962161808271, 37.62935758318677, 0], - [126.85117375756717, 37.62857341166028, 0], - [126.85270834722151, 37.627767885966804, 0], - [126.85422491886007, 37.62694125216734, 0], - [126.85572300984705, 37.62609376276238, 0], - [126.85720216323826, 37.6252256766141, 0], - [126.85866192792102, 37.62433725886664, 0], - [126.86010185875227, 37.62342878086451, 0], - [126.86152151669471, 37.62250052006899, 0], - [126.86292046895107, 37.621552759972786, 0], - [126.86429828909641, 37.6205857900127, 0], - [126.86565455720829, 37.61959990548062, 0], - [126.86698885999493, 37.61859540743262, 0], - [126.86830079092145, 37.61757260259639, 0], - [126.86958995033358, 37.61653180327683, 0], - [126.8708559455796, 37.61547332726007, 0], - [126.87209839112988, 37.6143974977157, 0], - [126.87331690869404, 37.61330464309744, 0], - [126.87451112733608, 37.612195097042196, 0], - [126.87568068358706, 37.61106919826745, 0], - [126.87682522155544, 37.60992729046731, 0], - [126.87794439303497, 37.60876972220679, 0], - [126.87903785761031, 37.607596846814815, 0], - [126.88010528276007, 37.6064090222757, 0], - [126.88114634395731, 37.605206611119236, 0], - [126.88216072476787, 37.603989980309365, 0], - [126.8831481169456, 37.602759501131594, 0], - [126.88410822052562, 37.60151554907904, 0], - [126.88504074391454, 37.60025850373721, 0], - [126.88594540397823, 37.59898874866758, 0], - [126.88682192612698, 37.59770667128998, 0], - [126.88767004439794, 37.596412662763754, 0], - [126.88848950153479, 37.595107117867876, 0], - [126.88928004906484, 37.59379043487999, 0], - [126.89004144737326, 37.59246301545427, 0], - [126.8907734657747, 37.591125264498494, 0], - [126.89147588258186, 37.58977759004986, 0], - [126.8921484851716, 37.5884204031502, 0], - [126.89279107004796, 37.58705411772004, 0], - [126.89340344290254, 37.58567915043185, 0], - [126.89398541867179, 37.58429592058265, 0], - [126.89453682159174, 37.58290484996566, 0], - [126.89505748524964, 37.58150636274122, 0], - [126.89554725263262, 37.58010088530718, 0], - [126.89600597617381, 37.57868884616844, 0], - [126.89643351779507, 37.57727067580597, 0], - [126.89682974894727, 37.575846806545286, 0], - [126.89719455064711, 37.574417672424325, 0], - [126.89752781351154, 37.572983709060836, 0], - [126.89782943778876, 37.57154535351937, 0], - [126.89809933338651, 37.570103044177834, 0], - [126.89833741989744, 37.568657220593586, 0], - [126.89854362662119, 37.5672083233694, 0], - [126.89871789258385, 37.56575679401895, 0], - [126.89886016655427, 37.56430307483211, 0], - [126.89897040705738, 37.56284760874014, 0], - [126.89904858238452, 37.56139083918054, 0], - [126.8990946706009, 37.55993320996194, 0], - [126.89910865954995, 37.55847516512879, 0], - [126.89909054685465, 37.557017148826084, 0], - [126.89904033991613, 37.555559605164056, 0], - [126.89895805590896, 37.554102978082945, 0], - [126.8988437217737, 37.55264771121777, 0], - [126.8986973742064, 37.55119424776332, 0], - [126.89851905964518, 37.54974303033927, 0], - [126.89830883425377, 37.548294500855484, 0], - [126.89806676390215, 37.546849100377585, 0], - [126.89779292414427, 37.545407268992875, 0], - [126.89748740019294, 37.5439694456764, 0], - [126.89715028689147, 37.54253606815764, 0], - [126.89678168868282, 37.541107572787375, 0], - [126.89638171957547, 37.539684394405164, 0], - [126.89595050310679, 37.53826696620721, 0], - [126.89548817230316, 37.53685571961481, 0], - [126.89499486963759, 37.535451084143375, 0], - [126.89447074698414, 37.53405348727201, 0], - [126.89391596556989, 37.53266335431378, 0], - [126.89333069592377, 37.53128110828668, 0], - [126.89271511782283, 37.52990716978528, 0], - [126.8920694202357, 37.52854195685318, 0], - [126.89139380126313, 37.527185884856245, 0], - [126.89068846807609, 37.525839366356614, 0], - [126.8899536368509, 37.52450281098779, 0], - [126.88918953270179, 37.52317662533038, 0], - [126.88839638961082, 37.52186121278897, 0], - [126.88757445035509, 37.52055697346992, 0], - [126.8867239664314, 37.519264304060236, 0], - [126.88584519797826, 37.517983597707385, 0], - [126.88493841369528, 37.51671524390037, 0], - [126.88400389076027, 37.51545962835176, 0], - [126.88304191474349, 37.51421713288109, 0], - [126.8820527795196, 37.512988135299246, 0], - [126.88103678717721, 37.51177300929427, 0], - [126.87999424792581, 37.51057212431826, 0], - [126.87892548000045, 37.509385845475784, 0], - [126.877830809564, 37.50821453341343, 0], - [126.87671057060705, 37.507058544210864, 0], - [126.87556510484555, 37.50591822927314, 0], - [126.87439476161614, 37.50479393522466, 0], - [126.87319989776918, 37.50368600380439, 0], - [126.8719808775598, 37.502594771762645, 0], - [126.87073807253635, 37.50152057075948, 0], - [126.86947186142723, 37.500463727264474, 0], - [126.86818263002509, 37.499424562458266, 0], - [126.86687077106947, 37.49840339213555, 0], - [126.86553668412685, 37.49740052660986, 0], - [126.86418077546932, 37.49641627061988, 0], - [126.86280345795068, 37.49545092323756, 0], - [126.86140515088098, 37.49450477777794, 0], - [126.85998627989926, 37.49357812171061, 0], - [126.85854727684394, 37.49267123657318, 0], - [126.857088579622, 37.491784397886256, 0], - [126.85561063207605, 37.49091787507049, 0], - [126.85411388384958, 37.49007193136536, 0], - [126.85259879025094, 37.489246823749816, 0], - [126.85106581211515, 37.488442802864945, 0], - [126.84951541566454, 37.48766011293834, 0], - [126.84794807236749, 37.48689899171065, 0], - [126.84636425879586, 37.486159670363904, 0], - [126.84476445648092, 37.48544237345194, 0], - [126.84314915176765, 37.48474731883276, 0], - [126.84151883566794, 37.48407471760296, 0], - [126.8398740037121, 37.48342477403416, 0], - [126.8382151557993, 37.48279768551159, 0], - [126.83654279604683, 37.48219364247459, 0], - [126.83485743263763, 37.48161282835936, 0], - [126.8331595776674, 37.48105541954373, 0], - [126.83144974698983, 37.48052158529412, 0], - [126.8297284600613, 37.48001148771461, 0], - [126.82799623978414, 37.479525281698194, 0], - [126.8262536123493, 37.4790631148801, 0], - [126.82450110707764, 37.4786251275935, 0], - [126.82273925626053, 37.478211452827274, 0], - [126.82096859499973, 37.47782221618595, 0], - [126.81918966104615, 37.47745753585202, 0], - [126.81740299463806, 37.477117522550344, 0], - [126.81560913833852, 37.47680227951489, 0], - [126.8138086368721, 37.4765119024577, 0], - [126.81200203696113, 37.476246479540094, 0], - [126.81018988716103, 37.47600609134615, 0], - [126.80837273769563, 37.47579081085855, 0], - [126.80655114029152, 37.47560070343657, 0], - [126.80472564801217, 37.47543582679647, 0], - [126.80289681509177, 37.47529623099413, 0], - [126.80106519676852, 37.47518195841001, 0], - [126.79923134911775, 37.475093043736436, 0], - [126.79739582888485, 37.475029513967115, 0], - [126.79555919331786, 37.47499138838909, 0], - [126.79372200000002, 37.47497867857689, 0], - [126.79188480668218, 37.47499138838909, 0], - [126.79004817111517, 37.475029513967115, 0], - [126.78821265088227, 37.475093043736436, 0], - [126.78637880323151, 37.47518195841001, 0], - [126.78454718490825, 37.47529623099413, 0], - [126.78271835198785, 37.47543582679647, 0], - [126.7808928597085, 37.47560070343657, 0], - [126.77907126230438, 37.47579081085855, 0], - [126.77725411283899, 37.47600609134615, 0], - [126.7754419630389, 37.476246479540094, 0], - [126.77363536312792, 37.4765119024577, 0], - [126.7718348616615, 37.47680227951489, 0], - [126.77004100536197, 37.477117522550344, 0], - [126.76825433895387, 37.47745753585202, 0], - [126.76647540500029, 37.47782221618595, 0], - [126.76470474373949, 37.478211452827274, 0], - [126.76294289292238, 37.4786251275935, 0], - [126.76119038765071, 37.4790631148801, 0], - [126.75944776021588, 37.479525281698194, 0], - [126.75771553993873, 37.48001148771461, 0], - [126.75599425301019, 37.48052158529412, 0], - [126.75428442233262, 37.48105541954373, 0], - [126.75258656736239, 37.48161282835936, 0], - [126.7509012039532, 37.48219364247459, 0], - [126.74922884420072, 37.48279768551159, 0], - [126.74756999628792, 37.48342477403416, 0], - [126.74592516433208, 37.48407471760296, 0], - [126.74429484823237, 37.48474731883276, 0], - [126.7426795435191, 37.48544237345194, 0], - [126.74107974120417, 37.486159670363904, 0], - [126.73949592763253, 37.48689899171065, 0], - [126.73792858433548, 37.48766011293834, 0], - [126.73637818788487, 37.488442802864945, 0], - [126.73484520974908, 37.489246823749816, 0], - [126.73333011615044, 37.49007193136536, 0], - [126.73183336792397, 37.49091787507049, 0], - [126.73035542037802, 37.491784397886256, 0], - [126.7288967231561, 37.49267123657318, 0], - [126.72745772010076, 37.49357812171061, 0], - [126.72603884911904, 37.49450477777794, 0], - [126.72464054204934, 37.49545092323756, 0], - [126.72326322453071, 37.49641627061988, 0], - [126.72190731587317, 37.49740052660986, 0], - [126.72057322893056, 37.49840339213555, 0], - [126.71926136997493, 37.499424562458266, 0], - [126.7179721385728, 37.500463727264474, 0], - [126.71670592746366, 37.50152057075948, 0], - [126.71546312244021, 37.502594771762645, 0], - [126.71424410223084, 37.50368600380439, 0], - [126.71304923838387, 37.50479393522466, 0], - [126.71187889515447, 37.50591822927314, 0], - [126.71073342939297, 37.507058544210864, 0], - [126.70961319043602, 37.50821453341343, 0], - [126.70851851999957, 37.509385845475784, 0], - [126.70744975207421, 37.51057212431826, 0], - [126.70640721282282, 37.51177300929427, 0], - [126.70539122048042, 37.512988135299246, 0], - [126.70440208525653, 37.51421713288109, 0], - [126.70344010923976, 37.51545962835176, 0], - [126.70250558630474, 37.51671524390037, 0], - [126.70159880202176, 37.517983597707385, 0], - [126.70072003356862, 37.519264304060236, 0], - [126.69986954964493, 37.52055697346992, 0], - [126.69904761038921, 37.52186121278897, 0], - [126.69825446729824, 37.52317662533038, 0], - [126.69749036314913, 37.52450281098779, 0], - [126.69675553192393, 37.525839366356614, 0], - [126.6960501987369, 37.527185884856245, 0], - [126.69537457976432, 37.52854195685318, 0], - [126.6947288821772, 37.52990716978528, 0], - [126.69411330407625, 37.53128110828668, 0], - [126.69352803443013, 37.53266335431378, 0], - [126.69297325301588, 37.53405348727201, 0], - [126.69244913036243, 37.535451084143375, 0], - [126.69195582769687, 37.53685571961481, 0], - [126.69149349689323, 37.53826696620721, 0], - [126.69106228042455, 37.539684394405164, 0], - [126.6906623113172, 37.541107572787375, 0], - [126.69029371310855, 37.54253606815764, 0], - [126.68995659980708, 37.5439694456764, 0], - [126.68965107585575, 37.545407268992875, 0], - [126.68937723609788, 37.546849100377585, 0], - [126.68913516574626, 37.548294500855484, 0], - [126.68892494035484, 37.54974303033927, 0], - [126.68874662579361, 37.55119424776332, 0], - [126.68860027822632, 37.55264771121777, 0], - [126.68848594409107, 37.554102978082945, 0], - [126.68840366008389, 37.555559605164056, 0], - [126.68835345314537, 37.557017148826084, 0], - [126.68833534045007, 37.55847516512879, 0], - [126.68834932939913, 37.55993320996194, 0], - [126.68839541761551, 37.56139083918054, 0], - [126.68847359294264, 37.56284760874014, 0], - [126.68858383344576, 37.56430307483211, 0], - [126.68872610741617, 37.56575679401895, 0], - [126.68890037337883, 37.5672083233694, 0], - [126.68910658010257, 37.568657220593586, 0], - [126.68934466661351, 37.570103044177834, 0], - [126.68961456221126, 37.57154535351937, 0], - [126.68991618648847, 37.572983709060836, 0], - [126.69024944935292, 37.574417672424325, 0], - [126.69061425105275, 37.575846806545286, 0], - [126.69101048220494, 37.57727067580597, 0], - [126.69143802382622, 37.57868884616844, 0], - [126.6918967473674, 37.58010088530718, 0], - [126.69238651475038, 37.58150636274122, 0], - [126.69290717840828, 37.58290484996566, 0], - [126.69345858132824, 37.58429592058265, 0], - [126.6940405570975, 37.58567915043185, 0], - [126.69465292995206, 37.58705411772004, 0], - [126.69529551482843, 37.5884204031502, 0], - [126.69596811741816, 37.58977759004986, 0], - [126.69667053422532, 37.591125264498494, 0], - [126.69740255262676, 37.59246301545427, 0], - [126.69816395093518, 37.59379043487999, 0], - [126.69895449846523, 37.595107117867876, 0], - [126.69977395560208, 37.596412662763754, 0], - [126.70062207387303, 37.59770667128998, 0], - [126.7014985960218, 37.59898874866758, 0], - [126.70240325608547, 37.60025850373721, 0], - [126.7033357794744, 37.60151554907904, 0], - [126.70429588305441, 37.602759501131594, 0], - [126.70528327523216, 37.603989980309365, 0], - [126.70629765604271, 37.605206611119236, 0], - [126.70733871723995, 37.6064090222757, 0], - [126.7084061423897, 37.607596846814815, 0], - [126.70949960696505, 37.60876972220679, 0], - [126.71061877844458, 37.60992729046731, 0], - [126.71176331641296, 37.61106919826745, 0], - [126.71293287266396, 37.612195097042196, 0], - [126.71412709130598, 37.61330464309744, 0], - [126.71534560887014, 37.6143974977157, 0], - [126.71658805442041, 37.61547332726007, 0], - [126.71785404966644, 37.61653180327683, 0], - [126.71914320907857, 37.61757260259639, 0], - [126.72045514000509, 37.61859540743262, 0], - [126.72178944279175, 37.61959990548062, 0], - [126.72314571090361, 37.6205857900127, 0], - [126.72452353104894, 37.621552759972786, 0], - [126.72592248330533, 37.62250052006899, 0], - [126.72734214124775, 37.62342878086451, 0], - [126.728782072079, 37.62433725886664, 0], - [126.73024183676176, 37.6252256766141, 0], - [126.73172099015297, 37.62609376276238, 0], - [126.73321908113995, 37.62694125216734, 0], - [126.73473565277853, 37.627767885966804, 0], - [126.73627024243285, 37.62857341166028, 0], - [126.73782238191731, 37.62935758318677, 0], - [126.73939159763991, 37.63012016100053, 0], - [126.74097741074749, 37.6308609121449, 0], - [126.74257933727272, 37.631579610324025, 0], - [126.74419688828259, 37.632276035972694, 0], - [126.7458295700285, 37.632949976323914, 0], - [126.74747688409796, 37.63360122547451, 0], - [126.74913832756768, 37.63422958444861, 0], - [126.75081339315817, 37.63483486125903, 0], - [126.75250156938979, 37.635416870966395, 0], - [126.7542023407399, 37.635975435736206, 0], - [126.75591518780163, 37.636510384893676, 0], - [126.75763958744362, 37.637021554976386, 0], - [126.75937501297109, 37.63750878978467, 0], - [126.76112093428807, 37.63797194042983, 0], - [126.7628768180606, 37.63841086538005, 0], - [126.76464212788103, 37.63882543050407, 0], - [126.76641632443342, 37.63921550911257, 0], - [126.76819886565956, 37.63958098199724, 0], - [126.76998920692631, 37.63992173746762, 0], - [126.77178680119331, 37.6402376713855, 0], - [126.77359109918183, 37.64052868719711, 0], - [126.77540154954409, 37.64079469596291, 0], - [126.77721759903336, 37.64103561638503, 0], - [126.7790386926747, 37.64125137483235, 0], - [126.78086427393612, 37.64144190536327, 0], - [126.78269378490033, 37.641607149746044, 0], - [126.78452666643705, 37.64174705747672, 0], - [126.78636235837538, 37.64186158579482, 0], - [126.78820029967686, 37.641950699696444, 0], - [126.79003992860864, 37.64201437194515, 0], - [126.7918806829168, 37.6420525830803, 0] - ] - ] - }, - "properties": { - "name": "김포공항", - "description": "김포공항 비행금지구역", - "type": "0006" - } - }, { "type": "Feature", diff --git a/src/components/map/mapbox/MapBoxMap.js b/src/components/map/mapbox/MapBoxMap.js index f923b485..5433b876 100644 --- a/src/components/map/mapbox/MapBoxMap.js +++ b/src/components/map/mapbox/MapBoxMap.js @@ -1,6 +1,6 @@ import 'mapbox-gl/dist/mapbox-gl.css'; import mapboxgl from 'mapbox-gl'; -// import threebox from 'threebox-plugin'; +import threebox from 'threebox-plugin'; import MapboxLanguage from '@mapbox/mapbox-gl-language'; import { MAPBOX_TOKEN } from '../../../configs/constants'; import { useEffect, useState, useRef } from 'react'; @@ -11,6 +11,7 @@ import { DronMarker } from './dron/DronMarker'; // import { NaverMapSearch } from './search/NaverMapSearch'; import { FeatureAirZone } from './feature/FeatureAirZone'; import geoJson from '../../map/geojson/airArea.json'; +// import gimPo from '../../map/geojson/gimpoAirportAirArea.json'; import gimPo from '../../map/geojson/gimpoAirportAirArea.json'; // import DronPlan from './dron/DronPlan'; // import NewDronPlan from './dron/NewDronPlan'; @@ -248,7 +249,6 @@ export default function MapBoxMap() { useEffect(() => { if (mapObject) { - console.log(mapControl); handlerCreateAirSpace(mapObject); } }, [ @@ -264,7 +264,7 @@ export default function MapBoxMap() { map, useGeoJson = { ...geoJson, - features: [...geoJson.features, ...gimPo.features] + features: [...geoJson.features] } ) => { if (map.getLayer('maine')) { @@ -342,19 +342,54 @@ export default function MapBoxMap() { map.addControl(language); // 드래그 제한 2d - map.dragRotate.disable(); - - // const tb = (window.tb = new threebox.Threebox( - // map, - // map.getCanvas().getContext('webgl'), - // { - // defaultLights: true, - // enableSelectingObjects: true, - // enableDraggingObjects: true, - // enableRotatingObjects: true, - // enableTooltips: true - // } - // )); + // map.dragRotate.disable(); + + const tb = (window.tb = new threebox.Threebox( + map, + map.getCanvas().getContext('webgl'), + { + enableSelectingObjects: true, + enableTooltips: true + } + )); + + map.on('load', () => { + map.addLayer({ + id: 'route', + type: 'custom', + renderingMode: '3d', + onAdd: function () { + for (let i = 0; i < gimPo.features.length; i++) { + let line; + var options = { + path: gimPo.features[i].geometry.coordinates + }; + + for (let j = 0; j < options.path.length; j++) { + const lngLat = { + lng: options.path[j][0], + lat: options.path[j][1] + }; + const elevation = Math.floor(map.queryTerrainElevation(lngLat)); + // 지형 고도를 라인의 z 좌표로 설정합니다. + options.path[j][2] += elevation; + } + + let lineGeometry = options.path; + line = tb.line({ + geometry: lineGeometry, + width: gimPo.features[i].properties['stroke-width'], + color: gimPo.features[i].properties.stroke + }); + + tb.add(line); + } + }, + render: function () { + tb.update(); + } + }); + }); map.on('style.load', () => { const layers = map.getStyle().layers; @@ -363,16 +398,17 @@ export default function MapBoxMap() { ).id; // 지형 3d start - // map.addSource('mapbox-dem', { - // type: 'raster-dem', - // url: 'mapbox://mapbox.mapbox-terrain-dem-v1', - // tileSize: 512, - // maxZoom: 14, - // pitch: 0, // Set pitch to 0 for a 2D view - // bearing: 0 // Set bearing to 0 for a north-up view - // }); - // map.setTerrain({ source: 'mapbox-dem', exaggeration: 1.5 }); + map.addSource('mapbox-dem', { + type: 'raster-dem', + url: 'mapbox://mapbox.mapbox-terrain-dem-v1' + // tileSize: 512, + // maxZoom: 14, + // pitch: 0, // Set pitch to 0 for a 2D view + // bearing: 0 // Set bearing to 0 for a north-up view + }); + map.setTerrain({ source: 'mapbox-dem', exaggeration: 1 }); + // 지형 높이 표시 // map.addLayer({ // id: 'contour-labels', // type: 'symbol', @@ -424,43 +460,43 @@ export default function MapBoxMap() { // }); // 등고선 end // 3d building - // map.addLayer( - // { - // id: 'add-3d-buildings', - // source: 'composite', - // 'source-layer': 'building', - // filter: ['==', 'extrude', 'true'], - // type: 'fill-extrusion', - // minzoom: 15, - // paint: { - // 'fill-extrusion-color': '#aaa', - - // // Use an 'interpolate' expression to - // // add a smooth transition effect to - // // the buildings as the user zooms in. - // 'fill-extrusion-height': [ - // 'interpolate', - // ['linear'], - // ['zoom'], - // 15, - // 0, - // 15.05, - // ['get', 'height'] - // ], - // 'fill-extrusion-base': [ - // 'interpolate', - // ['linear'], - // ['zoom'], - // 15, - // 0, - // 15.05, - // ['get', 'min_height'] - // ], - // 'fill-extrusion-opacity': 0.6 - // } - // }, - // labelLayerId - // ); + map.addLayer( + { + id: 'add-3d-buildings', + source: 'composite', + 'source-layer': 'building', + filter: ['==', 'extrude', 'true'], + type: 'fill-extrusion', + minzoom: 15, + paint: { + 'fill-extrusion-color': '#aaa', + + // Use an 'interpolate' expression to + // add a smooth transition effect to + // the buildings as the user zooms in. + 'fill-extrusion-height': [ + 'interpolate', + ['linear'], + ['zoom'], + 15, + 0, + 15.05, + ['get', 'height'] + ], + 'fill-extrusion-base': [ + 'interpolate', + ['linear'], + ['zoom'], + 15, + 0, + 15.05, + ['get', 'min_height'] + ], + 'fill-extrusion-opacity': 0.6 + } + }, + labelLayerId + ); // 3d building // 공역 색상 및 공역 표출 정보에 따른 노출 diff --git a/src/components/map/mapbox/feature/FeatureAirZone.js b/src/components/map/mapbox/feature/FeatureAirZone.js index 52defa26..9f256c42 100644 --- a/src/components/map/mapbox/feature/FeatureAirZone.js +++ b/src/components/map/mapbox/feature/FeatureAirZone.js @@ -7,12 +7,12 @@ import '../../../../assets/css/custom.css'; // 격자 공역 Source const airPort = [ - { - title: '김포공항', - buffer: 9300, - center: [126.793722, 37.558522], - reduce: [54.4, 218.6, 500, 905.4, 1459.8, 2195, 3173.5, 4552.5, 6952.5] - }, + // { + // title: '김포공항', + // buffer: 9300, + // center: [126.793722, 37.558522], + // reduce: [54.4, 218.6, 500, 905.4, 1459.8, 2195, 3173.5, 4552.5, 6952.5] + // }, { title: '인천공항', buffer: 9300, @@ -133,7 +133,7 @@ export const FeatureAirZone = props => { const featureAirZoneInit = () => { const useGeoJson = { ...geoJson, - features: [...geoJson.features, ...gimPo.features] + features: [...geoJson.features] }; // 비행장 마커 생성