-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PolygonLayer有时候会显示出跟数据无关的乱线条 #2342
Comments
hi @flyours, welcome! |
import { Scene, LineLayer, PolygonLayer } from '@antv/l7'; function initMap() { }); |
完整的测试如上 |
应该是 WebGL 数据精度的问题,切换成高德没有问题 |
高德tile也有问题: https://codesandbox.io/p/sandbox/strange-https-9n4tr9?file=%2Findex.js%3A12%2C6 |
import { Scene, LineLayer, RasterLayer, PolygonLayer } from "@antv/l7"; function initMap() {
}); |
使用 GaodeMap |
这个高德地图的尖刺和当前的问题是同一个么? |
问题描述
const mydata={
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "01",
"properties": {
"name": "Alabama",
"density": 94.65
},
"geometry": {"type":"Polygon","coordinates":[[[121.438197843854,31.2618062190434],[121.438234702671,31.2618000670963],[121.438241928073,31.2617702668736],[121.438278786903,31.2617641149022],[121.438286012306,31.2617343146507],[121.438256378878,31.2617106663743],[121.438263604279,31.2616808660976],[121.438233970862,31.2616572178044],[121.438197112056,31.2616633697926],[121.438167478662,31.2616397214873],[121.438174704061,31.2616099211892],[121.438145070678,31.2615862728672],[121.438108211908,31.2615924248478],[121.438078578547,31.2615687765136],[121.438041719802,31.2615749284782],[121.438012086465,31.2615512801319],[121.437975227745,31.2615574320806],[121.437945594431,31.2615337837221],[121.437908735735,31.2615399356549],[121.437879102445,31.2615162872843],[121.437842243774,31.2615224392011],[121.43783501838,31.2615522394802],[121.437798159722,31.2615583913728],[121.437790934329,31.261588191623],[121.437790934329,31.261588191623],[121.437790934329,31.261588191623],[121.437798159722,31.2615583913728],[121.437768526468,31.2615347429946],[121.437775167368,31.2615073533863],[121.43777575186,31.2615049427193],[121.43777575186,31.2615049427193],[121.43777575186,31.2615049427193],[121.437770467931,31.2615007259536],[121.437746118617,31.2614812943243],[121.437753344008,31.2614514940239],[121.437723710775,31.2614278456122],[121.437730936165,31.2613980452867],[121.437701302942,31.2613743968582],[121.437708528331,31.2613445965076],[121.43767889512,31.2613209480624],[121.437642036532,31.2613270999725],[121.437612403344,31.2613034515152],[121.43761962873,31.2612736511432],[121.437589995552,31.2612500026692],[121.437553137001,31.2612561545717],[121.437523503847,31.2612325060855],[121.43748664532,31.2612386579722],[121.437457012189,31.2612150094738],[121.437464237572,31.2611852090843],[121.437434604452,31.2611615605692],[121.437397745961,31.2611677124482],[121.437368112864,31.261144063921],[121.437331254398,31.2611502157842],[121.437301621325,31.2611265672448],[121.437308846704,31.2610967668377],[121.437279213641,31.2610731182815],[121.437242355211,31.2610792701372],[121.437212722172,31.2610556215689],[121.437175863767,31.2610617734085],[121.43714623075,31.2610381248281],[121.437153456126,31.2610083244034],[121.43712382312,31.2609846758063],[121.437086964751,31.2609908276384],[121.437057331769,31.2609671790291],[121.437020473425,31.2609733308453],[121.436990840466,31.2609496822238],[121.436998065838,31.2609198817816],[121.436968432889,31.2608962331434],[121.436931574582,31.260902384952],[121.436901941656,31.2608787363017],[121.436865083373,31.2608848880944],[121.436835450471,31.2608612394319],[121.43684267584,31.2608314389721],[121.436813042949,31.2608077902929],[121.436776184702,31.260813942078],[121.436746551834,31.2607902933866],[121.4367537772,31.2607604929056],[121.436724144343,31.2607368441975],[121.436687286132,31.260742995975],[121.436657653298,31.2607193472548],[121.436620795112,31.2607254990164],[121.436591162301,31.260701850284],[121.436598387664,31.2606720497854],[121.436568754864,31.2606484010362],[121.436531896714,31.2606545527903],[121.436502263937,31.260630904029],[121.436465405812,31.2606370557672],[121.436435773059,31.2606134069937],[121.436398914958,31.2606195587159],[121.436391689599,31.2606493592032],[121.436354831512,31.2606555109011],[121.436347606153,31.2606853113595],[121.436377238881,31.2607089601238],[121.436370013521,31.260738760557],[121.436333155435,31.2607449122222],[121.436325930076,31.2607747126266],[121.436289072003,31.2607808642674],[121.436281846644,31.2608106646429],[121.436244988584,31.2608168162595],[121.436237763224,31.260846616606],[121.436200905178,31.2608527681983],[121.436193679819,31.2608825685159],[121.436223312505,31.260906217245],[121.436260170564,31.2609000656612],[121.436289803274,31.2609237143781],[121.436326661357,31.2609175627783],[121.436356294091,31.2609412114832],[121.436349068728,31.2609710117832],[121.436378701472,31.2609946604713],[121.436415559592,31.260988508864],[121.436445192359,31.2610121575399],[121.436482050503,31.2610060059166],[121.436511683294,31.2610296545804],[121.436504457928,31.2610594548629],[121.436534090729,31.26108310351],[121.436570948909,31.2610769518791],[121.436600581734,31.2611006005141],[121.436637439939,31.2610944488673],[121.436667072787,31.26111809749],[121.436703931016,31.2611119458273],[121.436733563888,31.2611355944379],[121.436726338517,31.2611653947067],[121.436755971399,31.2611890433006],[121.436748746027,31.2612188435442],[121.43677837892,31.2612424921214],[121.436815237197,31.2612363404595],[121.436844870113,31.2612599890245],[121.436881728415,31.2612538373466],[121.436911361354,31.2612774858995],[121.436904135979,31.2613072861256],[121.436933768928,31.2613309346617],[121.436970627267,31.2613247829763],[121.43700026024,31.2613484315003],[121.437037118603,31.2613422797989],[121.437066751599,31.2613659283108],[121.43705952622,31.2613957285193],[121.437089159227,31.2614193770144],[121.437126017626,31.2614132253055],[121.437155650657,31.2614368737884],[121.43719250908,31.2614307220636],[121.437222142134,31.2614543705344],[121.437214916752,31.2614841707254],[121.437244549816,31.2615078191794],[121.437281408276,31.261501667447],[121.437311041364,31.2615253158889],[121.437347899848,31.2615191641406],[121.437377532959,31.2615428125704],[121.437370307573,31.2615726127438],[121.437399940695,31.2615962611568],[121.437436799216,31.261590109401],[121.437466432361,31.2616137578018],[121.437503290906,31.26160760603],[121.437504718863,31.2616087455934],[121.437532924075,31.2616312544187],[121.437525698685,31.2616610545746],[121.437555331864,31.2616847029466],[121.437548106473,31.2617145030774],[121.437577739662,31.2617381514326],[121.437614598255,31.2617319996616],[121.437644231468,31.2617556480047],[121.437681090086,31.2617494962178],[121.437710723322,31.2617731445487],[121.437747581965,31.2617669927459],[121.437777215225,31.2617906410647],[121.437769989829,31.2618204411817],[121.437799623099,31.2618440894837],[121.437836481778,31.2618379376733],[121.437866115071,31.2618615859632],[121.437902973775,31.2618554341369],[121.437932607092,31.2618790824147],[121.437925381692,31.2619088825141],[121.43795501502,31.2619325307751],[121.437991873759,31.2619263789412],[121.43802150711,31.2619500271901],[121.438058365875,31.2619438753403],[121.438065591276,31.2619140752332],[121.438102450054,31.2619079233591],[121.438132083441,31.2619315716004],[121.438168942243,31.2619254197103],[121.438176167646,31.2618956195706],[121.438146534246,31.2618719713247],[121.438153759648,31.2618421711599],[121.438190618452,31.2618360192371],[121.438197843854,31.2618062190434]],[[121.43775480736,31.2617371926037],[121.43775480736,31.2617371926038],[121.437748743785,31.2617622009797],[121.43775480736,31.2617371926038],[121.43775480736,31.2617371926037]]]}
}
]
}
const layer = new PolygonLayer({})
.source(mydata)
.color('#2ca02c')
.shape('fill')
.size(1)
.style({
opacity: 0.5,
})
.active(true);
const layer2 = new LineLayer({
zIndex: 2
})
.source(mydata)
.color('#2ca02c')
.active(true)
.size(1)
.style({
opacity: 1, // 设置线的透明度
})
scene.addLayer(layer);
scene.addLayer(layer2);
layer.fitBounds()
这个面图层会显示出乱线条, 在其他工具, 比如geojson.io是显示正常的
重现链接
https://codesandbox.io/s/thirsty-cdn-9n4tr9?file=/index.js
重现步骤
No response
预期行为
No response
平台
屏幕截图或视频(可选)
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: