-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue #64 Add Marker/Pointer Inspect Widget to support Titiler COG layers #81
Conversation
get working for STAC layers
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.
I think it's looking quite good! Nice extension of what's already there. Let me know if you'd like to chat about any of my comments.
def handle_interaction(self, action, geo_json, **kwargs): | ||
def handle_clear(event): | ||
draw_layer = main.find_layer("draw_layer") | ||
main.remove_layer(draw_layer) |
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.
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.
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.
Ghost coordinates taken care of 👍🏼 as for the additional thought, its a great one. Logic is mostly duplicated here and switching between tabs and if there is a layer with values, we should trigger on switch. I made a TODO note in the code to tackle for later as there are other TODOs in which code can be reorganized
if layers_data: | ||
display_data(layers_data) | ||
else: | ||
point_data.value = f"<p><b>Coordinates:</b></p><code>{self.coordinates}</code><br/>" |
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.
Any thoughts on handling in the same html_template pattern as the rest of the data? Not a huge deal, but just an idea to keep things in a similar style.
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.
Ahh yes, I think this is good hear because display_data
is a for loop that loops over all the visibile applied layers! But I guess the function names are not very explicit about that so let me change the names 🏃🏼♀️
stac_ipyleaflet/core.py
Outdated
if self.draw_control_added: | ||
self.remove(self.draw_control) | ||
self.draw_control_added = False | ||
if self.inspect_control_added: | ||
self.remove(self.inspect_control) | ||
self.inspect_control_added = False |
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.
Should we combine these? I don't think it's possible to view one without the other.
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.
Hmm not too sure what you mean here, this is related the pointer or square area drawer control. When one tab Point or Area
is selected and if a control was already applied, it needs to be removed, not sure if this is related to what you are asking though
Summary:
What did I do?
This adds the inspect/pointer widget feature.
This feature only currently works for
/cog
layers from titilerWhy *** did I do it? (What was the motivation?)
How *** can someone test or demo my changes?
*** When relevant, use screenshots to document
One Layer
Multiple Layers
No Markers
No Layer applied
/mosaics layer applied (will behave as if there is no layer currently)
Fixes or Addresses Issue #: [ticket number & link]
#64
Checklist before requesting a review: