Commit 6f19cd40 authored by Kris Vanneste's avatar Kris Vanneste
Browse files

Fixed draw_wms_layer method of LayeredBasemap.

git-svn-id: https://svn.seismo.oma.be/svn/seismo/mapping/layeredbasemap/trunk@7659 40b490c5-b4d9-47cb-8714-9bef99b524d5
parent 7406132b
......@@ -1827,12 +1827,27 @@ class LayeredBasemap:
tl_labels.extend(legend_labels)
def draw_wms_layer(self, wms_data, wms_style):
self.map.wmsimage(wms_data.url, layers=wms_data.layers, verbose=wms_data.verbose, zorder=self.zorder, axes=self.ax, **wms_style.to_kwargs())
"""
Draw WMS layer
:param wms_data:
instance of :class:`WMSData`
:param wms_style:
instance of :class:`WMSStyle`
"""
kwargs = wms_style.to_kwargs()
if wms_data.wms_version:
kwargs['version'] = wms_data.wms_version
## Hack: some servers require crs instead of srs
kwargs['crs'] = 'EPSG:%s' % self.map.epsg
im = self.map.wmsimage(wms_data.url, layers=wms_data.layers,
verbose=wms_data.verbose, ax=self.ax, **kwargs)
im.zorder = self.zorder
self.zorder += 1
def draw_mask(self, polygon, mask_style=None, outside=True):
"""
polygon or multipolygon, holes are disregarded
polygon or multipolygon, holes are discarded
"""
if not mask_style:
mask_style = PolygonStyle(fill_color="w", line_color="None", line_width=0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment