-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feat]Support Zoom to layer in layer panel #2516
Conversation
@liuwo2 Thanks for the PR. I enabled CI, seems some tests are failing. Also to pass the DCO bullet you need to sign your commit |
emmm, I will attempt to resubmit and fix it. |
@liuwo23 Apologies for the delay, this is approved and will be landed as soon as the CI tests are green. |
okay |
Signed-off-by: liuwo <18484922722@qq.com>
I recommit these changes , and replace the zoomtolayer's icon. Hope you recheck these changes. |
Signed-off-by: liuwo <18484922722@qq.com>
Signed-off-by: liuwo <18484922722@qq.com>
Signed-off-by: liuwo <18484922722@qq.com>
The tests turned green. What else needs to be passed? |
Thanks for the contribution. PS - Our goal is to start pushing for doc updates together with PR, but we do have a big backlog of documentation and release notes, so maybe there is no obvious place for you to document this. |
Signed-off-by: liuwo <18484922722@qq.com> Signed-off-by: Chris Gervang <chris@gervang.com>
Add a zoomtolayer PanelAction in the component of layer-panel-header. (The icon is temporarily using filterFunnel, and a scaling icon will need to be designed later),Then, import MapStateActions.fitBounds in the parent components and write function onZoomToLayer:
_zoomToLayer: MouseEventHandler = e => { e?.stopPropagation(); const bounds = this.props.layer?.meta?.bounds; bounds && this.props.zoomToLayer(bounds); };
Support #2446