MCPcopy Create free account
hub / github.com/python-visualization/folium / WmsTileLayer

Class WmsTileLayer

folium/raster_layers.py:158–235  ·  view source on GitHub ↗

Creates a Web Map Service (WMS) layer. Parameters ---------- url : str The url of the WMS server. layers : str Comma-separated list of WMS layers to show. styles : str, optional Comma-separated list of WMS styles. fmt : str, default 'image/jpeg'

Source from the content-addressed store, hash-verified

156
157
158class WmsTileLayer(Layer):
159 """
160 Creates a Web Map Service (WMS) layer.
161
162 Parameters
163 ----------
164 url : str
165 The url of the WMS server.
166 layers : str
167 Comma-separated list of WMS layers to show.
168 styles : str, optional
169 Comma-separated list of WMS styles.
170 fmt : str, default 'image/jpeg'
171 The format of the service output. Ex: 'image/png'
172 transparent: bool, default False
173 Whether the layer shall allow transparency.
174 version : str, default '1.1.1'
175 Version of the WMS service to use.
176 attr : str, default ''
177 The attribution of the service.
178 Will be displayed in the bottom right corner.
179 name : string, optional
180 The name of the Layer, as it will appear in LayerControls
181 overlay : bool, default True
182 Adds the layer as an optional overlay (True) or the base layer (False).
183 control : bool, default True
184 Whether the Layer will be included in LayerControls.
185 show: bool, default True
186 Whether the layer will be shown on opening.
187 **kwargs : additional keyword arguments
188 Passed through to the underlying tileLayer.wms object and can be used
189 for setting extra tileLayer.wms parameters or as extra parameters in
190 the WMS request.
191
192 See https://leafletjs.com/reference.html#tilelayer-wms
193 """
194
195 _template = Template(
196 """
197 {% macro script(this, kwargs) %}
198 var {{ this.get_name() }} = L.tileLayer.wms(
199 {{ this.url|tojson }},
200 {{ this.options|tojson }}
201 );
202 {% endmacro %}
203 """
204 ) # noqa
205
206 def __init__(
207 self,
208 url: str,
209 layers: str,
210 styles: str = "",
211 fmt: str = "image/jpeg",
212 transparent: bool = False,
213 version: str = "1.1.1",
214 attr: str = "",
215 name: Optional[str] = None,

Callers

nothing calls this directly

Calls 1

TemplateClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…