本文整理汇总了Python中safe_qgis.report.map.Map.map_title方法的典型用法代码示例。如果您正苦于以下问题:Python Map.map_title方法的具体用法?Python Map.map_title怎么用?Python Map.map_title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类safe_qgis.report.map.Map
的用法示例。
在下文中一共展示了Map.map_title方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_map_title
# 需要导入模块: from safe_qgis.report.map import Map [as 别名]
# 或者: from safe_qgis.report.map.Map import map_title [as 别名]
def test_get_map_title(self):
"""Getting the map title from the keywords"""
layer, _ = load_layer('test_floodimpact.tif')
report = Map(IFACE)
report.set_impact_layer(layer)
title = report.map_title()
expected_title = 'Penduduk yang Mungkin dievakuasi'
message = 'Expected: %s\nGot:\n %s' % (expected_title, title)
assert title == expected_title, message
示例2: test_getMapTitle
# 需要导入模块: from safe_qgis.report.map import Map [as 别名]
# 或者: from safe_qgis.report.map.Map import map_title [as 别名]
def test_getMapTitle(self):
"""Getting the map title from the keywords"""
myLayer, _ = load_layer('test_floodimpact.tif')
myMap = Map(IFACE)
myMap.set_impact_layer(myLayer)
myTitle = myMap.map_title()
myExpectedTitle = 'Penduduk yang Mungkin dievakuasi'
myMessage = 'Expected: %s\nGot:\n %s' % (myExpectedTitle, myTitle)
assert myTitle == myExpectedTitle, myMessage
示例3: test_handle_missing_map_title
# 需要导入模块: from safe_qgis.report.map import Map [as 别名]
# 或者: from safe_qgis.report.map.Map import map_title [as 别名]
def test_handle_missing_map_title(self):
"""Missing map title from the keywords fails gracefully"""
# TODO running OSM Buildngs with Pendudk Jakarta
# wasthrowing an error when requesting map title
# that this test wasnt replicating well
layer, _ = load_layer('population_padang_1.asc')
report = Map(IFACE)
report.set_impact_layer(layer)
title = report.map_title()
expected_title = None
message = 'Expected: %s\nGot:\n %s' % (expected_title, title)
assert title == expected_title, message
示例4: test_handleMissingMapTitle
# 需要导入模块: from safe_qgis.report.map import Map [as 别名]
# 或者: from safe_qgis.report.map.Map import map_title [as 别名]
def test_handleMissingMapTitle(self):
"""Missing map title from the keywords fails gracefully"""
# TODO running OSM Buildngs with Pendudk Jakarta
# wasthrowing an error when requesting map title
# that this test wasnt replicating well
myLayer, _ = load_layer('population_padang_1.asc')
myMap = Map(IFACE)
myMap.set_impact_layer(myLayer)
myTitle = myMap.map_title()
myExpectedTitle = None
myMessage = 'Expected: %s\nGot:\n %s' % (myExpectedTitle, myTitle)
assert myTitle == myExpectedTitle, myMessage