我正在使用 amCharts 来显示地图。单击图标后,我想缩放并显示行中定义的所有“描述”标签。我添加map.allowMultipleDescriptionWindows = true;
了一次显示更多描述的属性。然后我添加了监听器来处理点击事件,但它导致了循环。
然后我在缩放事件中编辑了代码 - 当我点击“3”图标时,我得到所有的线条对象并调用map.clickMapObject(line);
,但问题是描述显示在我的光标位置,我需要它在线条位置,如下所示:
有什么解决方案可以解决这个问题吗?这就是我定义线条和描述的方式:
map.dataProvider.areas = [
{
id: "CZ",
"title": "Czech republic",
"lines": [
{
id: PLarrowId,
groupId: groupId,
"arc": 0,
"selectable": true,
"color": "rgba(0,0,0,0.8)",
"thickness": 2.8,
"dashLength": 0,
"longitudes": [
26.9098,
31.8658
],
"latitudes": [
53.851,
55.8603
],
"arrow": "start",
"arrowSize": 16.8,
"description": "<table><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>4</td><td>5</td><td>6</td></tr></table>",
"title": "Table 2"
},