管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2022-11-10 e0efc6467622bf9944535ef15a4ab5abc44d2686
ExportMap/Sources/render.py
@@ -82,8 +82,11 @@
# map = layout.itemById(r'地图')
map = layout.referenceMap()
map.zoomToExtent(map.extent())
# map.zoomToExtent(map.extent())
print('1:' + str(math.ceil(map.scale())))
size = map.sizeWithUnits()
print('size: ' + str(size.width()) + " * " + str(size.height()) + " mm")
# 设置图层
# "阀室", "站场", "管道中心线", "矢量注记", "矢量图", "高德影像注记", "高德影像", "影像注记", "影像图"
@@ -93,9 +96,9 @@
# set_layers_valid(project, showLayers)
set_item_visibility(root, showLayers)
collection = layout.pageCollection()
page = collection.page(0)
page.refreshItemSize()
# collection = layout.pageCollection()
# page = collection.page(0)
# page.refreshItemSize()
# 刷新
map.refresh()