def get_test_default_layers(dbsession, default_ogc_server): from c2cgeoportal_commons.models.main import LayerWMTS, LayerWMS default_wms = LayerWMS('wms-defaults') default_wms.ogc_server = default_ogc_server default_wms.time_widget = 'datepicker' default_wms.time_mode = 'value' dbsession.add(default_wms) default_wmts = LayerWMTS('wmts-defaults') default_wmts.url = 'https:///wmts.geo.admin_default.ch.org?service=wms&request=GetCapabilities' default_wmts.layer = 'default' default_wmts.matrix_set = 'matrix' dbsession.add(default_wmts) dbsession.flush() return {'wms': default_wms, 'wmts': default_wmts}
def get_test_default_layers(dbsession, default_ogc_server): from c2cgeoportal_commons.models.main import LayerVectorTiles, LayerWMS, LayerWMTS default_wms = LayerWMS("wms-defaults") default_wms.ogc_server = default_ogc_server default_wms.time_widget = "datepicker" default_wms.time_mode = "value" dbsession.add(default_wms) default_wmts = LayerWMTS("wmts-defaults") default_wmts.url = "https:///wmts.geo.admin_default.ch.org?service=wms&request=GetCapabilities" default_wmts.layer = "default" default_wmts.matrix_set = "matrix" dbsession.add(default_wmts) default_vectortiles = LayerVectorTiles("vectortiles-defaults") default_vectortiles.style = "https://vectortiles-staging.geoportail.lu/styles/roadmap/style.json" dbsession.add(default_vectortiles) dbsession.flush() return { "wms": default_wms, "wmts": default_wmts, "vectortiles": default_vectortiles }