@@ -123,6 +123,8 @@ def get_external_wms_layer(resource, url, layerName, infoFormat, logger):
123
123
124
124
capabilities = parseString (capabilitiesXml )
125
125
contents = getFirstElementByTagName (capabilities , "WMS_Capabilities" )
126
+ if not contents :
127
+ contents = getFirstElementByTagName (capabilities , "WMT_MS_Capabilities" )
126
128
127
129
targetLayer = None
128
130
for layer in contents .getElementsByTagName ("Layer" ):
@@ -165,7 +167,7 @@ def get_external_wms_layer(resource, url, layerName, infoFormat, logger):
165
167
boundingBox = getFirstElementByTagName (targetLayer , "BoundingBox" )
166
168
if boundingBox is not None :
167
169
bbox = {
168
- "crs" : boundingBox .getAttribute ("CRS" ),
170
+ "crs" : boundingBox .getAttribute ("CRS" ) or boundingBox . getAttribute ( "SRS" ) ,
169
171
"bounds" : [
170
172
float (boundingBox .getAttribute ("minx" )),
171
173
float (boundingBox .getAttribute ("miny" )),
@@ -245,7 +247,7 @@ def get_external_wmts_layer(resource, capabilitiesUrl, layerName, crs, logger):
245
247
tileMatrixSet = child
246
248
tileMatrixName = getFirstElementValueByTagName (tileMatrixSet , "ows:Identifier" )
247
249
supportedCrs = getFirstElementValueByTagName (tileMatrixSet , "ows:SupportedCRS" )
248
- crsMatch = re .search ('(EPSG).*:(\d+)' , supportedCrs )
250
+ crsMatch = re .search (r '(EPSG).*:(\d+)' , supportedCrs )
249
251
if crsMatch and crs == "EPSG:" + crsMatch .group (2 ) and tileMatrixName in layerTileMatrixSet :
250
252
tileMatrix = tileMatrixSet .getElementsByTagName ("TileMatrix" )
251
253
break
0 commit comments