更新时间:2021年02月25日
文字覆盖物
文字(Text)在地图上也是一种覆盖物,由BMFText类定义,示例代码如下:
/// text经纬度信息 BMFCoordinate position = new BMFCoordinate(39.73235, 116.350338); /// 构造text BMFText bmfText = BMFText( text: 'hello world', position: position, bgColor: Colors.blue, fontColor: Colors.red, fontSize: 40, typeFace: BMFTypeFace( familyName: BMFFamilyName.sMonospace, textStype: BMFTextStyle.BOLD_ITALIC), alignY: BMFVerticalAlign.ALIGN_TOP, alignX: BMFHorizontalAlign.ALIGN_LEFT, rotate: 30.0); /// 添加text myMapController.addText(bmfText);
运行结果如下:
Text更新(Android独有)
接口 | 说明 |
---|---|
updateText | 更新Text文本 |
updatePosition | 更新Text经纬度 |
updateBgColor | 更新Text背景颜色 |
updateFontColor | 更新Text字体颜色 |
updateTypeFace | 更新Text typeFace |
updateFontSize | 更新Text 字体大小 |
updateAlign | 更新Text 文字覆盖对齐方式 |
updateRotate | 更新Text 旋转角度 |
Dot更新(Android独有)
接口 | 说明 |
---|---|
updateCenter | 更新中心点center |
updateRadius | 更新半径 |
updateColor | 更新颜色 |