各位大佬,我在加载标签专题图时,有些设备显示不正确,如上图所示,目前发现,小米青春版10,和鸿蒙3.0显示是这种样子。请问这种要怎样解决,代码如下:
val tl = ThemeLabel()
tl.labelExpression = xlayer.labelExpression
val ts = TextStyle()
ts.alignment = TextAlignment.MIDDLECENTER
ts.fontName = "宋体";
ts.fontHeight = 2.5;
ts.setWeight(200);
tl.uniformStyle = ts
tl.backShape = LabelBackShape.RECT
val geoStyle_L = GeoStyle()
var color = android.graphics.Color.parseColor("#E4EED1")
if (!xlayer.labelBackgroundColor.isNullOrEmpty()) {
color = android.graphics.Color.parseColor(xlayer.labelBackgroundColor)
}
//region 面样式
geoStyle_L.fillForeColor = Color(color)
tl.backStyle = geoStyle_L
mMap!!.isDynamicProjection = true
var layer = mMap!!.layers.add(dataset, tl, true)