Skip to content

Commit 7365592

Browse files
authored
Update __init__.py
managing WebMapService constructor parameters when available
1 parent 461b402 commit 7365592

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/basemap/src/mpl_toolkits/basemap/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -4452,7 +4452,10 @@ def wmsimage(self,server,\
44524452
if ypixels is None:
44534453
ypixels = int(self.aspect*xpixels)
44544454
if verbose: print(server)
4455-
wms = WebMapService(server)
4455+
wmsInitKeys = ['version', 'xml', 'username', 'password','parse_remote_metadata', 'timeout', 'headers', 'auth']
4456+
wms_options = {k:kwargs[v] for k in wmsInitKeys if k in kwargs}
4457+
kwargs = {k:kwargs[v] for k in kwargs if k not in wmsInitKeys}
4458+
wms = WebMapService(server, **wms_options)
44564459
if verbose:
44574460
print('id: %s, version: %s' %
44584461
(wms.identification.type,wms.identification.version))

0 commit comments

Comments
 (0)