本文整理匯總了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