LarkMap
LarkMap copied to clipboard
🥰 [FEATURE] Support rotation for IconImageLayer
💻 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]
@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
}
}
https://l7.antv.antgroup.com/examples/point/text/#point_text 看这个demo rotation 通过style配置支持