-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refactor inspector into an ipywidgets subclass #1663
Conversation
Thank you for refactoring. Overall, it looks good to me. One small bug is that it stucks when clicking at a location that is not covered by all layers. import ee
import geemap
Map = geemap.Map(center=(40, -100), zoom=4)
dem = ee.Image('USGS/SRTMGL1_003')
states = ee.FeatureCollection("TIGER/2018/States")
vis_params = {
'min': 0,
'max': 4000,
'palette': ['006633', 'E5FFCC', '662A00', 'D8D8D8', 'F5F5F5'],
}
Map.addLayer(dem, vis_params, 'SRTM DEM', True, 0.5)
Map.addLayer(states, {}, "US States")
Map.add_inspector()
Map |
else: | ||
return Tree(nodes=[root_node]) | ||
|
||
def _objects_info(self, latlon, names=None, visible=True, return_node=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.
The refactored _object_info()
function only has the latlon
parameter, missing the names
and visible
parameters. The bug occurs when the mouse-clicking location does not interact the feature collection.
else: | ||
return Tree(nodes=[root_node]) | ||
|
||
def _pixels_info( |
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.
Similarly, the refactored _pixels_info()
function only has the latlon
parameter. It also causes issues when clicking at locations without pixels.
I'll take a look. I think I know what's happening. It's likely due to removing some exception handling code when doing the EE computations. |
No description provided.