Skip to content

Commit

Permalink
Do not use getCapabilities without breaking the catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
rmichaelis committed Sep 7, 2022
1 parent 5c5d9a3 commit 6349259
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion geoportal/geoportailv3_geoportal/views/luxthemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
# override c2cgeoportal Entry class to customize handling of WMS and WMTS time positions and prepare
# the theme tree for ngeo time functions
class LuxThemes(Theme):
async def _wms_getcap(self, ogc_server, preload=False):
errors = set()
if preload:
return None, set()

return {"layers": []}, set()

@view_config(route_name="themes", renderer="json")
def themes(self):
Expand Down Expand Up @@ -80,7 +86,17 @@ def _fill_wms(self, layer_theme, layer, errors, mixed):
)
)
else:
return super()._fill_wms(layer_theme, layer, errors, mixed)
wms, wms_errors = self._wms_layers(layer.ogc_server)
errors |= wms_errors
if wms is None:
return
layer_theme["imageType"] = layer.ogc_server.image_type
if layer.style: # pragma: no cover
layer_theme["style"] = layer.style

layer_theme["childLayers"] = []
if mixed:
layer_theme["ogcServer"] = layer.ogc_server.name

@view_config(route_name="lux_themes", renderer="json")
def lux_themes(self):
Expand Down

0 comments on commit 6349259

Please sign in to comment.