LarkMap icon indicating copy to clipboard operation
LarkMap copied to clipboard

🥰 [FEATURE] Support rotation for IconImageLayer

Open ForeverArt opened this issue 2 years ago • 2 comments

💻 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]

ForeverArt avatar Jul 05 '23 19:07 ForeverArt

@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
    }
  }

lvisei avatar Jul 17 '23 07:07 lvisei

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

lzxue avatar Nov 09 '23 03:11 lzxue