From 73655928a6f75e89ff98bb5dc4e76745248478ea Mon Sep 17 00:00:00 2001 From: Kurea Date: Wed, 15 May 2024 11:49:54 +0200 Subject: [PATCH] Update __init__.py managing WebMapService constructor parameters when available --- packages/basemap/src/mpl_toolkits/basemap/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/basemap/src/mpl_toolkits/basemap/__init__.py b/packages/basemap/src/mpl_toolkits/basemap/__init__.py index a7050bee..669fddb8 100644 --- a/packages/basemap/src/mpl_toolkits/basemap/__init__.py +++ b/packages/basemap/src/mpl_toolkits/basemap/__init__.py @@ -4452,7 +4452,10 @@ def wmsimage(self,server,\ if ypixels is None: ypixels = int(self.aspect*xpixels) if verbose: print(server) - wms = WebMapService(server) + wmsInitKeys = ['version', 'xml', 'username', 'password','parse_remote_metadata', 'timeout', 'headers', 'auth'] + wms_options = {k:kwargs[v] for k in wmsInitKeys if k in kwargs} + kwargs = {k:kwargs[v] for k in kwargs if k not in wmsInitKeys} + wms = WebMapService(server, **wms_options) if verbose: print('id: %s, version: %s' % (wms.identification.type,wms.identification.version))