-
Notifications
You must be signed in to change notification settings - Fork 34
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
Editor: Service as resource layer suggestion #1114
Conversation
Affected libs:
|
📷 Screenshots are here! |
10ad151
to
86a745a
Compare
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.
Thank you! Made a few comments to hopefully help you improve the PR, let me know when you need another look, thanks!
function wmsLayerFlatten(layerFull) { | ||
const layer = { | ||
title: layerFull.title, | ||
name: layerFull.name, | ||
abstract: layerFull.abstract, | ||
} | ||
|
||
return 'children' in layerFull && Array.isArray(layerFull.children) | ||
? [layer, ...layerFull.children.flatMap(wmsLayerFlatten)] | ||
: [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.
One day it'd be great to have this in ogc-client, but this can wait 🙂
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.
New PR in ogc-client: camptocamp/ogc-client#89
...rc/lib/components/online-service-resource-input/online-service-resource-input.component.html
Outdated
Show resolved
Hide resolved
...rc/lib/components/online-service-resource-input/online-service-resource-input.component.html
Outdated
Show resolved
Hide resolved
0d6132f
to
53e59ad
Compare
53e59ad
to
e1b60d7
Compare
e1b60d7
to
82df975
Compare
fa4b19a
to
c9f4177
Compare
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.
Thank you! it works well and the code looks good :)
const endpointWmts = new WmtsEndpoint(url) | ||
await endpointWmts.isReady() |
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.
FYI you can also do const endpoint = await new WmtsEndpoints(url).isReady()
No need to change it here, just for next time ;)
Description
This PR improves the service as resource form by adding layer suggestion as a dropdown list.
OGC, WMS,WMTS, WFS are supported. For other protocol, a simple input text is displayed in place of the dropdown.
You can find some services here: https://camptocamp.github.io/ogc-client/#/ or https://geoservices.ign.fr/documentation/services/services-geoplateforme/diffusion#70064
Architectural changes
None
Screenshots
Also added a use case: custom validate icon in storybook for url-input-component
Quality Assurance Checklist
breaking change
labelbackport <release branch>
label