-
Notifications
You must be signed in to change notification settings - Fork 32
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
Use geospatial-sdk for maps #949
Conversation
Affected libs:
|
e73d854
to
0d95f46
Compare
Most of the features should work; still working on the missing tests |
0d95f46
to
2f3fe49
Compare
📷 Screenshots are here! |
3712499
to
15f8c8e
Compare
59d28c0
to
f58a017
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.
Waooo, thanks for the huge work @jahow ! It looks very clean and the geospatial-sdk seems handy to use. Maybe some words on the possibilities how to use map (with and without a map state) could be useful in the gn-ui doc?
When testing, most things worked smoothly, the only things I've noticed were:
-
map-viewer:
-
web components:
- http://localhost:8001/webcomponents/gn-dataset-view-map.sample.html works fine
- http://localhost:8001/webcomponents/gn-map-viewer.sample.html does not work, but not sure it did before;-)
-
storybook:
I didn't test the datafeeder. Not sure if the failing CI is currently expected.
...rc/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.ts
Show resolved
Hide resolved
Also converted a few more components to standalone on the way
Several more dependencies are now only available in ESM only, so they need to be transformed for Jest.
7619966
to
4a38d07
Compare
Added a bit of doc :) thanks for the review @tkohr! |
The gn-mapviewer web component should work now layers should appear with their label in the layers panel Add missing styles in web components Fix a failing e2e test
4a38d07
to
dd44d80
Compare
Description
This PR refactors significantly the map-related logic of GeoNetwork-UI to rely mostly on the geospatial-sdk library.
How things work now:
gn-ui-map-container
component is used to display a map; it only takes a map context (MapContext
type from geospatial-sdk) as an input, and offers the following outputs:featuresClicked
,featuresHovered
,mapClick
openlayersMap
promise that resolves to the OL map when it's ready, if necessarygn-ui-map-state-container
component is connected to the map state, accessible through theMapFacade
; this facade lets us provide a new context to the map, and stores currently selected featuresDepending on the use case, a map can be shown with or without using the state; both ways are valid.
A lot of code was removed and brought back into the geospatial-sdk: map and layer creation, extent computation, etc.
Important: these features are not working yet and can be considered regressions:
Architectural changes
The following classes are gone:
Those features are now handled by the geospatial-sdk.
ogc-client was updated.
Several components were made standalone in the process. The UiMap module is gone entirely because all of its components are now standalone!
Quality Assurance Checklist
breaking change
labelbackport <release branch>
label