本文整理汇总了Python中c2cgeoportal.models.LayerGroup.isInternalWMS方法的典型用法代码示例。如果您正苦于以下问题:Python LayerGroup.isInternalWMS方法的具体用法?Python LayerGroup.isInternalWMS怎么用?Python LayerGroup.isInternalWMS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c2cgeoportal.models.LayerGroup
的用法示例。
在下文中一共展示了LayerGroup.isInternalWMS方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_layer
# 需要导入模块: from c2cgeoportal.models import LayerGroup [as 别名]
# 或者: from c2cgeoportal.models.LayerGroup import isInternalWMS [as 别名]
#.........这里部分代码省略.........
'id': 20,
'name': 'test WMTS',
'isChecked': False,
'type': 'WMTS',
'url': 'http://example.com/WMTS-Capabilities.xml',
'wmsUrl': '/dummy/route/mapserverproxy',
'wmsLayers': 'foo',
'queryLayers': [{
'name': 'test_wmsfeatures',
'minResolutionHint': 1.76,
'maxResolutionHint': 8.8200000000000003
}],
'legend': False,
'public': True,
}, []))
group1 = LayerGroup()
group1.name = 'block'
group2 = LayerGroup()
group2.name = 'node'
group2.metadataURL = 'http://example.com/group.metadata'
layer = Layer()
layer.id = 20
layer.name = 'test layer in group'
layer.isChecked = False
layer.layerType = "internal WMS"
layer.imageType = "image/png"
layer.legend = False
layer.public = True
group1.children = [group2]
group2.children = [layer]
self.assertEqual(entry._group(group1, [layer], [], None), ({
'isExpanded': False,
'isInternalWMS': True,
'name': u'block',
'isBaseLayer': False,
'children': [{
'isExpanded': False,
'isInternalWMS': True,
'name': u'node',
'isBaseLayer': False,
'metadataURL': 'http://example.com/group.metadata',
'children': [{
'name': u'test layer in group',
'id': 20,
'isChecked': False,
'type': u'internal WMS',
'legend': False,
'imageType': u'image/png',
'public': True,
}]
}]
}, [], False))
group1 = LayerGroup()
group1.isInternalWMS = True
group2 = LayerGroup()
group2.isInternalWMS = False
group1.children = [group2]
_, errors, stop = entry._group(group1, [], [], None)
self.assertTrue(len(errors) > 0)
self.assertFalse(stop)
group1 = LayerGroup()
group1.isInternalWMS = False
group2 = LayerGroup()
示例2: test_layer
# 需要导入模块: from c2cgeoportal.models import LayerGroup [as 别名]
# 或者: from c2cgeoportal.models.LayerGroup import isInternalWMS [as 别名]
#.........这里部分代码省略.........
"childLayers": [
{
"name": u"test_wmsfeatures",
"minResolutionHint": 1.76,
"maxResolutionHint": 8.8200000000000003,
"queryable": 1,
}
],
},
[],
),
)
group1 = LayerGroup()
group1.name = "block"
group2 = LayerGroup()
group2.name = "node"
group2.metadataURL = "http://example.com/group.metadata"
layer = Layer()
layer.id = 20
layer.name = "test layer in group"
layer.isChecked = False
layer.layerType = "internal WMS"
layer.imageType = "image/png"
layer.legend = False
layer.public = True
group1.children = [group2]
group2.children = [layer]
self.assertEqual(
entry._group(group1, [layer], [], None),
(
{
"isExpanded": False,
"isInternalWMS": True,
"name": u"block",
"isBaseLayer": False,
"children": [
{
"isExpanded": False,
"isInternalWMS": True,
"name": u"node",
"isBaseLayer": False,
"metadataURL": "http://example.com/group.metadata",
"children": [
{
"name": u"test layer in group",
"id": 20,
"isChecked": False,
"type": u"internal WMS",
"legend": False,
"imageType": u"image/png",
"public": True,
}
],
}
],
},
[],
False,
),
)
group1 = LayerGroup()
group1.isInternalWMS = True
group2 = LayerGroup()
group2.isInternalWMS = False