首页 / 浏览问题 / 组件GIS / 问题详情
超图FAQ:【iObject Java】用Java组件生成新地图,将新地图输出为图片失败
64,468EXP 2024年05月14日
【iObject Java】用Java组件生成新地图,将新地图输出为图片失败

1个回答

【解决办法】将图层添加到地图中后,可以通过设置图层全幅显示来修改map的显示范围,代码如下: Map map = new Map(workspace); Layer layer = map.getLayers().add(dataset, layerSettingVector, true); map.refresh(); map.ensureVisible(layer); map.setLineAntialias(true); workspace.getMaps().remove("name"); workspace.getMaps().add("name", map.toXML()); workspace.save(); map.outputMapToFile(filePath, ImageType.PNG, 96, dataset.getBounds(), true);
64,468EXP 2024年05月14日
热门文章
关注我们
...