polygon显示变形严重
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 656
- PR merge metrics
- No merged PRs in 30d
Description
### 问题描述
方型的polgon显示成了梯形
### 重现链接
https://codesandbox.io/p/sandbox/l7-demo-forked-fntqmt?workspaceId=ws_SquWjKnX9ZtaqtASempSjf
### 重现步骤
import { Scene, LineLayer, RasterLayer, PolygonLayer } from "@antv/l7";
import { Map } from "@antv/l7-maps";
function initMap() {
const scene = new Scene({
id: "map",
map: new Map({
zoom: 10,
minZoom: 5,
maxZoom: 20,
}),
});
scene.on("loaded", () => {
const layer0 = new RasterLayer();
layer0.source(
"https://webrd0{1-3}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
{
parser: {
type: "rasterTile",
tileSize: 256,
minZoom: 2,
maxZoom: 18,
},
}
);
scene.addLayer(layer0);
const mydata = {
type: "FeatureCollection",
features: [
{
type: "Feature",
id: "01",
properties: {
name: "Alabama",
density: 94.65,
},
geometry: {
type: "Polygon",
coordinates: [
[
[116.47835134, 40.00333684],
[116.47835333, 40.00330714],
[116.4783333, 40.00330639],
[116.47833131, 40.0033359],
[116.47835134, 40.00333684],
],
],
},
},
],
};
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();
});
}
initMap();
### 预期行为
应该是方型
### 平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
### 屏幕截图或视频(可选)
_No response_
### 补充说明(可选)
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.