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

🥰 [FEATURE] Support rotation for IconImageLayer #179

Open
ForeverArt opened this issue Jul 5, 2023 · 2 comments
Open

🥰 [FEATURE] Support rotation for IconImageLayer #179

ForeverArt opened this issue Jul 5, 2023 · 2 comments

Comments

@ForeverArt
Copy link

ForeverArt commented Jul 5, 2023

💻 Features description

Different roation for each icon image in IconImageLayer.

🏞 What problem does this feature solve

Could add direction info on icons.

🧐 What does the proposed API look like

"source": {
  "data": [
    {"x": 1, "y": 1, "angle": 30},
    {"x": 2, "y": 2, "angle": 90}
  ]
}

🚑 Any additional [like screenshots]

@lvisei
Copy link
Member

lvisei commented Jul 17, 2023

@lzxue L7 现在支持这样下面影射 rotate 吗

rotate(layer: ILayer, rotate: RotateAttr) {
    /**
     * rotate 的几种情况
     * layer.rotate(45);
     * layer.rotate('rotate', [45, 90]);
     * layer.rotate('x', (x) => 45);
     * layer.rotate('x*y', (x, y) => 45);
     */
    if (isString(rotate)) {
      // TODO: L7 rotate
      // layer.rotate(rotate);
    } else if (isFunction(rotate)) {
      // TODO: rotate isFunction
    } else if (isObject(rotate)) {
      // TODO: L7 rotate
    }
  }

@lzxue
Copy link
Contributor

lzxue commented Nov 9, 2023

https://l7.antv.antgroup.com/examples/point/text/#point_text 看这个demo rotation 通过style配置支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants