Skip to content

Fix WMS only layer bug #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion folium/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class WmsTileLayer(TileLayer):
def __init__(self, url, name=None,
format=None, layers=None, transparent=True,
attr=None):
attr=None, overlay=True):
"""
TODO docstring here
Expand All @@ -29,6 +29,7 @@ def __init__(self, url, name=None,
self.url = url
self.format = format
self.layers = layers
self.overlay = overlay
self.transparent = transparent
self.attr = attr

Expand Down
4 changes: 2 additions & 2 deletions folium/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,11 @@ def render(self, **kwargs):
self.base_layers = OrderedDict(
[(val.tile_name, val.get_name()) for key, val in
self._parent._children.items() if
isinstance(val, TileLayer) and not val.overlay])
isinstance(val, TileLayer) and not hasattr(val, 'overlay')])
self.overlays = OrderedDict(
[(val.tile_name, val.get_name()) for key, val in
self._parent._children.items() if
isinstance(val, TileLayer) and val.overlay])
isinstance(val, TileLayer) and hasattr(val, 'overlay')])

super(LayerControl, self).render()

Expand Down