浏览器版本低!无法浏览完整内容,建议升级或更换浏览器。
添加文字
下载开发文档
文字覆盖物

文字(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.jpg

Text更新(Android独有)

接口说明
updateText更新Text文本
updatePosition更新Text经纬度
updateBgColor更新Text背景颜色
updateFontColor更新Text字体颜色
updateTypeFace更新TexttypeFace
updateFontSize更新Text字体大小
updateAlign更新Text文字覆盖对齐方式
updateRotate更新Text旋转角度

Dot更新(Android独有)

接口说明
updateCenter更新中心点center
updateRadius更新半径
updateColor更新颜色

上一篇

绘制海量点

下一篇

绘制Overlay

本篇文章对您是否有帮助?