首页 / 浏览问题 / 组件GIS / 问题详情
给图片添加一个标题,但效果出不来,你是什么原因了
8EXP 2020年06月16日
m_mapLayoutControl.getMapLayout().setWorkspace(m_workspace);
       
       TextStyle textStyle = new TextStyle();
             textStyle.setShadow(true);
             textStyle.setAlignment(TextAlignment.TOPCENTER);
             textStyle.setBackColor(new Color(65, 65, 65));
             textStyle.setForeColor(new Color(174, 241, 176));
             textStyle.setBackOpaque(false);
             textStyle.setBold(true);
             textStyle.setFontName("楷体");
             textStyle.setFontHeight(50.0);
             textStyle.setFontWidth(30.0);
             textStyle.setSizeFixed(false);
             textStyle.setItalic(true);
             textStyle.setOutline(true);
             textStyle.setWeight(500);
             TextPart textPart = new TextPart("2000年各省人口数分段专题图", new Point2D(850, 2150),0);
             GeoText geoText = new GeoText(textPart, textStyle);

          // 将文本对象添加到地图的跟踪图层,出图显示
         
          m_mapLayoutControl.getMapLayout().getElements().addNew(geoText);

1个回答

你好你的代码我测试了下没有问题,你看一下标题是否被遮挡呢
2,842EXP 2020年06月16日
...