-
Notifications
You must be signed in to change notification settings - Fork 33
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
Ecoscope fork merge #613
Draft
vgeorge
wants to merge
31
commits into
main
Choose a base branch
from
merge/ecoscope-fork
base: main
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.
Draft
Ecoscope fork merge #613
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
2e84d8b
bump to decck.gl v9 - refers to a local build of @geoarrow/deck.gl-la…
atmorling d8229da
Fixing linking issue with local package
atmorling 2ebbca9
making a start on widgets
atmorling 92d7b68
testing title port + native deck.gl widgets
atmorling 3225f09
More widget stuffs
atmorling 5bebe6f
adding zoom and compass widgets
atmorling bf4dd4e
widget style updates
atmorling aa8ab19
Tentative north arrow implementation
atmorling a63cad9
Legend widget implementation
atmorling 09d5da5
scale widget implementation
atmorling 456b4d2
Merge branch 'main' into v9
atmorling 01af15f
Merge branch 'v9' into widgets
atmorling dbb6446
Bump to deck 9.0.15 for upstream bugfixes
atmorling fcdb11a
Merge branch 'v9' into widgets
atmorling 5c6e50a
set deck width and height
atmorling ca6b4bc
re-add widgets
atmorling 62dba95
deck version bump and expose height/width map props
atmorling 5035bcd
widget style cleanup
atmorling e11032c
first cut of PNG export button
atmorling ce9f2e3
Second pass of png export widget
atmorling e9d8cc0
Cut to public release of deck.gl-layers
atmorling 4593110
fix set_props
atmorling 7f52889
support static maps
atmorling 00fea80
add map_view to allow setting repeat=true
atmorling caa5f5d
add viz_layer()
atmorling 5c9aa65
fix save image click handler bug
atmorling 77c56d3
static components
atmorling 6ca2853
fix png export button
atmorling a8adb48
allow width/height vals to be strings - ie "100%"
atmorling da7be6b
Merge commit 'a8adb48ec43fff795506db5a9e7e0103f877d65c' into merge/ec…
vgeorge 7aee870
Set default mapWidth and mapHeight
vgeorge 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
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,96 @@ | ||
import traitlets | ||
from lonboard._base import BaseWidget | ||
|
||
class BaseDeckWidget(BaseWidget): | ||
|
||
# props = traitlets.Dict({}).tag(sync=True) # make me a class | ||
placement = traitlets.Enum( | ||
values=["top-left", "top-right", "bottom-left", "bottom-right", "fill"], | ||
default_value=None, | ||
allow_none=True | ||
).tag(sync=True) | ||
class_name = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
class FullscreenWidget(BaseDeckWidget): | ||
_widget_type = traitlets.Unicode("fullscreen").tag(sync=True) | ||
|
||
enter_label = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
exit_label = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
style = traitlets.Dict(default_value=None, allow_none=True).tag(sync=True) | ||
class_name = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
class ZoomWidget(BaseDeckWidget): | ||
_widget_type = traitlets.Unicode("zoom").tag(sync=True) | ||
|
||
zoom_in_label = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
zoom_out_label = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
transition_duration = traitlets.Int(default_value=None, allow_none=True).tag(sync=True) | ||
style = traitlets.Dict(default_value=None, allow_none=True).tag(sync=True) | ||
class_name = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
class CompassWidget(BaseDeckWidget): | ||
_widget_type = traitlets.Unicode("compass").tag(sync=True) | ||
|
||
label = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
transition_duration = traitlets.Int(default_value=None, allow_none=True).tag(sync=True) | ||
style = traitlets.Dict(default_value=None, allow_none=True).tag(sync=True) | ||
class_name = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
class NorthArrowWidget(BaseDeckWidget): | ||
_widget_type = traitlets.Unicode("north-arrow").tag(sync=True) | ||
|
||
label = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
transition_duration = traitlets.Int(default_value=None, allow_none=True).tag(sync=True) | ||
style = traitlets.Dict(default_value=None, allow_none=True).tag(sync=True) | ||
class_name = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
class TitleWidget(BaseDeckWidget): | ||
|
||
_widget_type = traitlets.Unicode("title").tag(sync=True) | ||
title = traitlets.Unicode(allow_none=False).tag(sync=True) | ||
style = traitlets.Dict(default_value=None, allow_none=True).tag(sync=True) | ||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
class LegendWidget(BaseDeckWidget): | ||
|
||
_widget_type = traitlets.Unicode("legend").tag(sync=True) | ||
title = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True) | ||
labels = traitlets.List(traitlets.Unicode()).tag(sync=True) | ||
colors = traitlets.List(traitlets.Unicode()).tag(sync=True) | ||
style = traitlets.Dict(default_value=None, allow_none=True).tag(sync=True) | ||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
class ScaleWidget(BaseDeckWidget): | ||
|
||
_widget_type = traitlets.Unicode("scale").tag(sync=True) | ||
style = traitlets.Dict(default_value=None, allow_none=True).tag(sync=True) | ||
max_width = traitlets.Int(default_value=None, allow_none=True).tag(sync=True) | ||
use_imperial = traitlets.Bool(default_value=None, allow_none=True).tag(sync=True) | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
class SaveImageWidget(BaseDeckWidget): | ||
|
||
_widget_type = traitlets.Unicode("save-image").tag(sync=True) | ||
style = traitlets.Dict(default_value=None, allow_none=True).tag(sync=True) | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) |
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
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
Oops, something went wrong.
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.
If we add
viz_layer
, then we should changeviz()
to useviz_layer
under the hood, because it looks like it's entirely duplicated.Separately, I want to think over this API a bit more.