| | |
| | | |
| | | # 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") |
| | | |
| | | # 设置图层 |
| | | # "阀室", "站场", "管道中心线", "矢量注记", "矢量图", "高德影像注记", "高德影像", "影像注记", "影像图" |
| | |
| | | # 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() |