From 6b8f3145faf9a10ee4ce52befef82d71de3ac6bb Mon Sep 17 00:00:00 2001 From: viglino Date: Fri, 7 Jun 2024 11:16:41 +0200 Subject: [PATCH] [BUG] remove service option --- src/control/WMSCapabilities.js | 36 +++++++++++----------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/src/control/WMSCapabilities.js b/src/control/WMSCapabilities.js index f3d6a0fc..be83177a 100644 --- a/src/control/WMSCapabilities.js +++ b/src/control/WMSCapabilities.js @@ -716,7 +716,7 @@ var ol_control_WMSCapabilities = class olcontrolWMSCapabilities extends ol_contr } var source_opt = { - url: parent.Capability.Request.GetMap.DCPType[0].HTTP.Get.OnlineResource, + url: (parent.Capability.Request.GetMap.DCPType[0].HTTP.Get.OnlineResource || '').replace(/service=wms&?/i,''), projection: srs, attributions: attributions, crossOrigin: this.get('cors') ? 'anonymous' : null, @@ -868,32 +868,18 @@ var ol_control_WMSCapabilities = class olcontrolWMSCapabilities extends ol_contr this.getCapabilities(url, { onload: function (cap) { if (cap) { - // Find layer recursively - var findLayer = function(layers) { - for (var i=0; i