-
Notifications
You must be signed in to change notification settings - Fork 46
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
Display current visible layers status #159
Display current visible layers status #159
Conversation
Should we make the Layer text name also Bold for active layers? |
maps_dashboards/public/components/layer_control_panel/layer_control_panel.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Junqiu Lei <[email protected]>
8cf5fd6
to
3a975e7
Compare
`, Index pattern: ${layer.source.indexPatternRefName}` + | ||
`, Geo field: ${layer.source.geoFieldName}` |
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.
why do we need these additional details? IMO, lets say, layer is invisible outside zoom levels x - y as content and keep layer name as title.
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.
Updated
Signed-off-by: Junqiu Lei <[email protected]>
Signed-off-by: Junqiu Lei <[email protected]>
if (zoom < layer.zoomRange[0] || zoom > layer.zoomRange[1]) { | ||
return `Layer is not visible outside of zoom range ${layer.zoomRange[0]} - ${layer.zoomRange[1]}`; | ||
} else { | ||
return `Layer is visible within zoom range ${layer.zoomRange[0]} - ${layer.zoomRange[1]}`; |
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.
This single message can cover both cases?
This layer is visible only with zoom range ${layer.zoomRange[0]} - ${layer.zoomRange[1]}
;
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.
Good catch, currently we will only need tooltip for invisible layers, will add more content for visible layers.
Can we also update the show/hide "eye" icon to properly display visible/invisible current status? |
Hi @kgcreative , the "eye" icon button was designed to control layer visible status to maplibre for this layer. If we also update the eye icon status based on whether layer range is in current zoom level or not, it might make the eye icon status changed wired. |
Signed-off-by: Junqiu Lei [email protected]
Description
Display current visible layer information on the layer control panel.
Demo
Screen.Recording.2023-01-06.at.3.53.36.PM.mov
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.