Skip to content
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

Make Layout interactive by default #1630

Merged
merged 3 commits into from
May 7, 2020
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
10 changes: 5 additions & 5 deletions cartoframes/viz/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class Layout:
M_SIZE (number, optional): Number of rows of the layout
viewport (dict, optional): Properties for display of the maps viewport.
Keys can be `bearing` or `pitch`.
is_static (boolean, optional): By default, all the maps in each visualization
are static images due to performance reasons. In order to set them interactive,
is_static (boolean, optional): By default is False. All the maps in each visualization
are interactive. In order to set them static images for performance reasons
set `is_static` to True.
map_height (number, optional): Height in pixels for each visualization.
Default is 250.
Expand Down Expand Up @@ -66,12 +66,12 @@ class Layout:
... Map(Layer('table_in_your_account'))
>>> ], viewport={ 'zoom': 2 })

Create an interactive layout
Create an static layout

>>> Layout([
... Map(Layer('table_in_your_account')), Map(Layer('table_in_your_account')),
... Map(Layer('table_in_your_account')), Map(Layer('table_in_your_account'))
>>> ], is_static=False)
>>> ], is_static=True)

"""
def __init__(self,
Expand All @@ -81,7 +81,7 @@ def __init__(self,
viewport=None,
map_height=250,
full_height=True,
is_static=True,
is_static=False,
**kwargs):

self._maps = maps
Expand Down
6 changes: 3 additions & 3 deletions docs/developer-center/examples/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@
"path": "map_layout",
"group": "Layout"
}, {
"title": "Make layout interactive",
"desc": "Create an interactive visualization layout",
"file": "interactive_layout",
"title": "Make layout static",
"desc": "Create a static visualization layout",
"file": "static_layout",
"path": "map_layout",
"group": "Layout"
}]
Expand Down
300 changes: 171 additions & 129 deletions examples/map_layout/custom_layout.ipynb

Large diffs are not rendered by default.

136 changes: 69 additions & 67 deletions examples/map_layout/default_layout.ipynb

Large diffs are not rendered by default.

Loading