-
Notifications
You must be signed in to change notification settings - Fork 633
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
为啥使用json 数据没法将线条描绘出来 #2201
Labels
Comments
Json 需要是数组格式,如果对你有帮助欢迎 star一下 let position = [
{
name: "path1",
type: "LineString",
path: [
[58.00781249999999, 32.84267363195431],
[85.78125, 25.16517336866393],
[101.953125, 41.77131167976407],
[114.9609375, 39.639537564366684],
[117.42187500000001, 28.613459424004414],
],
},
];
const layer1 = new LineLayer({ zIndex: 1, autoFit: true })
.source(position, {
parser: {
type: "json",
coordinates: "path",
},
})
.shape("line")
.size(2)
.color("#f00");
scene.addLayer(layer1); |
抱歉造成了,误解文档按照单个元素写的 |
This was referenced Jan 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://codesandbox.io/p/sandbox/exciting-carson-fcsvf3?file=%2Findex.js%3A25%2C59
这是地址,麻烦看下,谢谢
The text was updated successfully, but these errors were encountered: