const  res =  await  axios. get ( url) const  xmlDom =  new  DOMParser ( ) . parseFromString ( res. data,  'text/xml' ) ; const  version =  xmlDom. getElementsByTagNameNS ( '*' ,  'ServiceTypeVersion' ) [ 0 ] . textContentconst  layerDom =  xmlDom. getElementsByTagNameNS ( '*' ,  'Layer' ) [ 0 ] const  layer =  layerDom. getElementsByTagNameNS ( '*' ,  'Identifier' ) [ 0 ] . textContentconst  styleDom =  layerDom. getElementsByTagNameNS ( '*' ,  'Style' ) [ 0 ] const  style =  styleDom. getElementsByTagNameNS ( '*' ,  'Identifier' ) [ 0 ] . textContentconst  format =  layerDom. getElementsByTagNameNS ( '*' ,  'Format' ) [ 0 ] . textContentconst  crsBoundingBox =  layerDom. getElementsByTagNameNS ( '*' ,  'BoundingBox' ) [ 1 ] const  crs =  crsBoundingBox. attributes. crs. valueconst  TileMatrixSetBox =  layerDom. getElementsByTagNameNS ( '*' ,  'TileMatrixSet' ) [ 2 ] const  TileMatrixSet =  TileMatrixSetBox. textContentconst  ResourceURL =  layerDom. getElementsByTagNameNS ( '*' ,  'ResourceURL' ) [ 0 ] const  serviceUrl =  ResourceURL. attributes. template. value. replace ( '{TileMatrixSet}' ,  TileMatrixSet) const  boundingBox =  layerDom. getElementsByTagNameNS ( '*' ,  'BoundingBox' ) [ 0 ] const  lowerCorner =  boundingBox. getElementsByTagNameNS ( '*' ,  'LowerCorner' ) [ 0 ] . textContentconst  upperCorner =  boundingBox. getElementsByTagNameNS ( '*' ,  'UpperCorner' ) [ 0 ] . textContentconst  xMin =  parseFloat ( lowerCorner. split ( ' ' ) [ 0 ] ) const  yMin =  parseFloat ( lowerCorner. split ( ' ' ) [ 1 ] ) const  xMax =  parseFloat ( upperCorner. split ( ' ' ) [ 0 ] ) const  yMax =  parseFloat ( upperCorner. split ( ' ' ) [ 1 ] )