当前位置: 首页>>代码示例>>Python>>正文


Python Map.map_title方法代码示例

本文整理汇总了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
开发者ID:SamudraYe,项目名称:inasafe,代码行数:11,代码来源:test_map.py

示例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
开发者ID:vdeparday,项目名称:inasafe,代码行数:11,代码来源:test_map.py

示例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
开发者ID:SamudraYe,项目名称:inasafe,代码行数:14,代码来源:test_map.py

示例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
开发者ID:vdeparday,项目名称:inasafe,代码行数:14,代码来源:test_map.py


注:本文中的safe_qgis.report.map.Map.map_title方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。