-
Notifications
You must be signed in to change notification settings - Fork 3
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
draft vizjson4 examples #94
Open
alrocar
wants to merge
3
commits into
web-sdk
Choose a base branch
from
vizjson-draft-1
base: web-sdk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<body class="as-app-body as-app"> | ||
<div class="as-app as-app--nav-left"> | ||
<header class="as-toolbar"></header> | ||
<div class="as-content"> | ||
<main class="as-main as-vertical"> | ||
<div class="as-map-area--left" id="map-area-0"> | ||
<div class="as-map-panels"> | ||
<div class="as-panel as-panel--top as-panel--left" id="map-area-panels-0"> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="as-map-area--right" id="map-area-1"> | ||
<div class="as-map-panels"> | ||
<div class="as-panel as-panel--top as-panel--left" id="map-area-panels-1"> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
<aside class="as-sidebar as-sidebar--right" id="sidebar-right-1"></aside> | ||
</div> | ||
</div> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
<body class="as-app-body as-app"> | ||
<div class="as-app as-app--nav-left"> | ||
<header class="as-toolbar"></header> | ||
<div class="as-content"> | ||
<main class="as-main"> | ||
<div class="as-map-area" id="map-area-0"> | ||
<div class="as-map-panels"> | ||
<div class="as-panel as-panel--top as-panel--left" id="map-area-panels-0"> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
<aside class="as-sidebar as-sidebar--right" id="sidebar-right-1"></aside> | ||
</div> | ||
</div> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
{ | ||
"version": "4.0.0-draft1", | ||
"meta": {}, # same as vizjson4_single | ||
"sources": [], # same as vizjson4_single | ||
"layers": [], # same as vizjson4_single | ||
"layout": { | ||
"template": "dual-map-right-sidebar" # template | ||
}, | ||
"widgets": [ | ||
{ | ||
"id": "map-0", | ||
"type": "map_widget", | ||
"layout_id": "map-area-0", | ||
"options": { | ||
# we need to force a 1:1 relation between layer and widget | ||
# widgets are tied to a layer_id, if a layer_id is present in multiple maps, then this could determine to which map the widgets are tied to | ||
# other option could be disallow the same layer_id to be present in more than one map | ||
"main": true, | ||
"map_provider": "deck.gl", | ||
"longitude": -95.8278, | ||
"latitude": 33.8324499999932, | ||
"zoom": 3 | ||
}, | ||
"layers": [] # if empty or non-present -> all layers | ||
}, | ||
{ | ||
"id": "map-1", # only the tornados points at different zoom level | ||
"type": "map_widget", | ||
"layout_id": "map-area-1", | ||
"options": { | ||
"map_provider": "deck.gl", | ||
"longitude": -95.8278, | ||
"latitude": 33.8324499999932, | ||
"zoom": 8, | ||
"sync_with": "map-0" # zoom and pan is synced with the main map | ||
}, | ||
"layers": ["a5040b6c-cb9e-4d96-8763-13a428edb1ab"] | ||
}, | ||
{ | ||
"id": "legend-id", | ||
"type": "legend_widget", | ||
"layout_id": "map-area-panels-0", | ||
"options": { | ||
"legends": [ | ||
{ | ||
"id": "a0dafa53-297a-492f-921f-e12e0c9d5975", | ||
"layer_id": "dcd65cfe-8b13-43b9-bf6a-ea74bb6a042f", | ||
"type": "color_category_legend", | ||
"options": { | ||
"prop": "color", | ||
"variable": "", | ||
"dynamic": true, | ||
"ascending": false, | ||
"footer": "", | ||
"description": "", | ||
"title": "" | ||
} | ||
}, | ||
{ | ||
"id": "7f647141-4e98-4693-9203-befb32d05bdd", | ||
"layer_id": "a5040b6c-cb9e-4d96-8763-13a428edb1ab", | ||
"type": "color_bins_legend", | ||
"options": { | ||
"prop": "color", | ||
"variable": "", | ||
"dynamic": true, | ||
"ascending": false, | ||
"footer": "", | ||
"description": "", | ||
"title": "" | ||
} | ||
}, | ||
{ | ||
"id": "7f647141-4e98-4693-9203-befb32d05bde", | ||
"layer_id": "a5040b6c-cb9e-4d96-8763-13a428edb1ab", | ||
"type": "size_bins_legend", | ||
"options": { | ||
"prop": "color", | ||
"variable": "", | ||
"dynamic": true, | ||
"ascending": false, | ||
"footer": "", | ||
"description": "", | ||
"title": "" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "e754c153-d076-41ae-9770-f438585c0370", | ||
"layout_id": "sidebar-right-1", | ||
"type": "formula_widget", | ||
"layer_id": "a5040b6c-cb9e-4d96-8763-13a428edb1ab", // for widget events to map | ||
"map_widget_id": "map-0", // for viewport events to widget | ||
"options": { | ||
"title": "Tornados count", | ||
"value": "cartodb_id", | ||
"operation": "count", | ||
"is_global": false | ||
// "column_type": "number", | ||
// "sync_on_bbox_change": true, | ||
// "style": { | ||
// "widget_style": { | ||
// "definition": { | ||
// "color": { | ||
// "fixed": "#9DE0AD", | ||
// "opacity": 1 | ||
// } | ||
// }, | ||
// "widget_color_changed": false | ||
// }, | ||
// "auto_style": { | ||
// "custom": false, | ||
// "allowed": true | ||
// } | ||
// }, | ||
} | ||
}, | ||
{ | ||
"id": "eeb866b8-f70e-4465-94eb-daefa36853d1", | ||
"layout_id": "sidebar-right-1", | ||
"type": "histogram_widget", | ||
"layer_id": "a5040b6c-cb9e-4d96-8763-13a428edb1ab", | ||
"options": { | ||
"title": "Damage", | ||
"value": "damage", | ||
"buckets": 10, | ||
// "column_type": "number", | ||
// "sync_on_bbox_change": true, | ||
// "style": { | ||
// "widget_style": { | ||
// "definition": { | ||
// "color": { | ||
// "fixed": "#9DE0AD", | ||
// "opacity": 1 | ||
// } | ||
// }, | ||
// "widget_color_changed": false | ||
// }, | ||
// "auto_style": { | ||
// "custom": false, | ||
// "allowed": true | ||
// } | ||
// }, | ||
} | ||
}, | ||
{ | ||
"id": "32acf0c6-116d-4e6d-8f61-406d5809a520", | ||
"layout_id": "sidebar-right-1", | ||
"type": "category_widget", | ||
"layer_id": "dcd65cfe-8b13-43b9-bf6a-ea74bb6a042f", | ||
"options": { | ||
"title": "loss", | ||
"value": "loss", | ||
// "aggregation_column": "loss", | ||
// "aggregation": "count", | ||
// "column_type": "string", | ||
// "sync_on_bbox_change": true, | ||
// "style": { | ||
// "widget_style": { | ||
// "definition": { | ||
// "color": { | ||
// "fixed": "#9DE0AD", | ||
// "opacity": 1 | ||
// } | ||
// }, | ||
// "widget_color_changed": false | ||
// }, | ||
// "auto_style": { | ||
// "custom": false, | ||
// "allowed": true | ||
// } | ||
// }, | ||
} | ||
}, | ||
{ | ||
"id": "deafults-id", | ||
"type": "defaults", | ||
"options": { # if not present all visible | ||
"zoom": { | ||
"visible": true, | ||
"position": "bottom left", | ||
"order": 0 | ||
}, | ||
"search": { | ||
"visible": true, | ||
"position": "bottom left", | ||
"order": 1 | ||
}, | ||
"attribution": { | ||
"visible": true, | ||
"position": "bottom left", | ||
"order": 2 | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would probably make sense to replace 'map_provider' with something like 'basemap_lib', as we're always gonna use deck.gl, but sometimes we will build over Mapbox GL and other times over GMaps