overlay~ArrawPopup(options)

带引导线的弹框。可灵活调整引导线和弹框的位置。随着弹框数量增多,渲染性能会有明显下降。

Summary

Methods:

Constructor

new ArrawPopup(options)

构造函数。

Parameters:
Name Type Description
options Object

可选项,其他参数说明请参见基类hmap.overlay.Overlay的参数说明。

Name Type Description
anchorType String

锚点的形状,只支持:椭圆"ellipse"、矩形"rect"。锚点:引导线的起始点。

anchorWidth Number

锚点形状的宽。

anchorHeight Number

锚点形状的高。

anchorFillColor module:style~Color

锚点形状的填充色。

anchorStrokeColor module:style~Color

锚点形状的描边色。

anchorStrokeWidth Number

锚点形状的描边宽。

linePointOffsetArr Array.<module:basetype~Offset>

线上拐点(包括终点),距线起始点的偏移量。

lineWidth Number

线宽。

lineColor module:style~Color

线的颜色。

popOffsetLine module:basetype~Offset

弹框左上角点距离线终点的偏移量。

scaleFactor Number

模拟近大远小以及前后关系的因子,为0时表示没有效果,值越大缩放效果越明显,默认没有近大远小的效果

Example
let content = document.createElement("div");
content.textContent = "带引导线的弹框内容";
let location = new hmap.basetype.Coordinate(120.435078, 30.19345, 0);
let arrawPopup = new hmap.overlay.ArrawPopup({
     "visible":true,
     "domId":"a",
     "element":content,
     "location":location,
     "offset": new hmap.basetype.Offset(10,10),
     "anchorType": "ellipse",
     "anchorWidth": 2,
     "anchorHeight": 2,
     "anchorFillColor": new hmap.style.Color(0,0,0,1),
     "anchorStrokeColor": new hmap.style.Color(255,0,0,1),
     "anchorStrokeWidth": 2,
     "linePointOffsetArr": [new hmap.basetype.Offset(10,10),new hmap.basetype.Offset(20,10)],
     "lineWidth": 5,
     "lineColor": new hmap.style.Color(0,0,0,1),
     "popOffsetLine": new hmap.basetype.Offset(0,0)
});

Methods