Skip to content
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

如何给point图层集合点分别添加旋转值? #1844

Closed
lzxue opened this issue Sep 7, 2023 Discussed in #1841 · 9 comments · Fixed by #1853
Closed

如何给point图层集合点分别添加旋转值? #1844

lzxue opened this issue Sep 7, 2023 Discussed in #1841 · 9 comments · Fixed by #1853
Assignees
Labels
👀 need more info issue 需要提供更多描述信息

Comments

@lzxue
Copy link
Contributor

lzxue commented Sep 7, 2023

Discussed in #1841

Originally posted by liuminglhd September 7, 2023
rotate()方法无法生效

@lzxue lzxue self-assigned this Sep 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

Hi @lzxue, Please star this repo if you find it useful! Thanks ⭐!
你好 @lzxue。如果该仓库对你有用,可以 star 一下,感谢你的 ⭐!

@MacJayLee
Copy link

同问 求解答

@lzxue lzxue added the 👀 need more info issue 需要提供更多描述信息 label Sep 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

Hello @lzxue. Please provide a online reproduction by forking codesandbox of @antv/l7 demo template Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @lzxue, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 @antv/l7 demo 模板 3 天内未跟进此 issue 将会被自动关闭。

@lzxue
Copy link
Contributor Author

lzxue commented Sep 8, 2023

同问 求解答

你提供个demo 吧,按照上面模板

1 similar comment
@lzxue
Copy link
Contributor Author

lzxue commented Sep 8, 2023

同问 求解答

你提供个demo 吧,按照上面模板

@MacJayLee
Copy link

`import { Scene, PointLayer } from "@antv/l7";
import { GaodeMap } from "@antv/l7-maps";

const scene = new Scene({
id: "map",
map: new GaodeMap({
pitch: 0,
style: "light",
center: [121.435159, 31.256971],
zoom: 3
})
});
const fontFamily = "iconfont";
const fontPath =
"//at.alicdn.com/t/font_2534097_fcae9o2mxbv.woff2?t=1622200439140";
scene.addFontFace(fontFamily, fontPath);
scene.addIconFont("icon1", "");

var data = [
{
lng: 121.435159,
lat: 31.256971
}
];

const pointLayer = new PointLayer({})
.source(data, {
parser: {
type: "json",
x: "lng",
y: "lat"
}
})
.shape("icon1", "text") // 指定需要映射字段为 icon、shape 类型和普通的文字标注一样为 text
.size(50)
.color("red")
.style({
textAnchor: "center", // 文本相对锚点的位置 center|left|right|top|bottom|top-left
padding: [0, 0], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
stroke: "#ffffff", // 描边颜色
fontFamily,
iconfont: true // 开启 iconfont 映射
});
scene.addLayer(pointLayer);`

1694144174773

如代码所示 在地图上生成了一个icon 现在我希望让icon旋转90度 怎么实现??

同问 求解答

你提供个demo 吧,按照上面模板

@lzxue
Copy link
Contributor Author

lzxue commented Sep 8, 2023

目前应该是有bug,需要支持,提供demo 最好提供在线访问的demo, codesanbox

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

Hello @lzxue. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @lzxue,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到 master 分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

giphy

@MacJayLee
Copy link

目前应该是有bug,需要支持,提供demo 最好提供在线访问的demo, codesanbox

sandbox 链接

https://codesandbox.io/s/l7-demo-forked-xjfdtp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 need more info issue 需要提供更多描述信息
Development

Successfully merging a pull request may close this issue.

3 participants