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


Python LayerGroup.isInternalWMS方法代码示例

本文整理汇总了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()
开发者ID:tonio,项目名称:c2cgeoportal,代码行数:70,代码来源:test_entry.py

示例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
开发者ID:bbinet,项目名称:c2cgeoportal,代码行数:70,代码来源:test_entry.py


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