Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
managing WebMapService constructor parameters when available
  • Loading branch information
Kurea authored May 15, 2024
1 parent 461b402 commit 7365592
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/basemap/src/mpl_toolkits/basemap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7365592

Please sign in to comment.