浏览器版本低!无法浏览完整内容,建议升级或更换浏览器。

WebAPI文档全面上新

新增示例代码、在线运行等功能,帮助您实现快速接入,前往体验吧!

体验新版
更新时间: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.jpg

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 更新颜色
  • 文档根本没法用

  • 文档水平很差

  • 文档水平一般

  • 文档不错

  • 文档写的很好

如发现文档错误,或对此文档有更好的建议,请在下方反馈。问题咨询请前往反馈平台提交工单咨询。

提交反馈

拖动标注工具

添加矩形标注

添加箭头标注

完成

取消