當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。