From ab4f464c009fc528b2a33f61c9f3b8cc8ec558a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Michaud?= Date: Sun, 29 Sep 2024 20:08:11 +0200 Subject: [PATCH] wms layer with api key are now saved in project --- .../vividsolutions/jump/workbench/model/WMSLayer.java | 10 ++++++---- .../jump/workbench/model/WMSLayer.java2xml | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/com/vividsolutions/jump/workbench/model/WMSLayer.java b/src/com/vividsolutions/jump/workbench/model/WMSLayer.java index 8888ff51a..90cb13bad 100644 --- a/src/com/vividsolutions/jump/workbench/model/WMSLayer.java +++ b/src/com/vividsolutions/jump/workbench/model/WMSLayer.java @@ -82,13 +82,15 @@ public WMSLayer() { public WMSLayer(LayerManager layerManager, String serverURL, String srs, List layerNames, String format, String version) throws IOException { - this(layerManager, initializedService(serverURL, version), srs, layerNames, + this(layerManager, initializedService(serverURL, version, null), srs, layerNames, format); } - private static WMService initializedService(String serverURL, String version) + private static WMService initializedService(String serverURL, String version, + String apiKeyNameAndValue) throws IOException { - WMService initializedService = new WMService(serverURL, version); + WMService initializedService = + new WMService(serverURL, version, apiKeyNameAndValue, true); initializedService.initialize(); return initializedService; } @@ -268,7 +270,7 @@ public Blackboard getBlackboard() { public WMService getService() throws IOException { if (service == null) { Assert.isTrue(serverURL != null); - setService(initializedService(serverURL, wmsVersion)); + setService(initializedService(serverURL, wmsVersion, apiKeyNameAndValue)); } return service; } diff --git a/src/com/vividsolutions/jump/workbench/model/WMSLayer.java2xml b/src/com/vividsolutions/jump/workbench/model/WMSLayer.java2xml index be2dd261e..d59c0c2af 100644 --- a/src/com/vividsolutions/jump/workbench/model/WMSLayer.java2xml +++ b/src/com/vividsolutions/jump/workbench/model/WMSLayer.java2xml @@ -12,6 +12,7 @@ +