-
Notifications
You must be signed in to change notification settings - Fork 3
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
(How) can we visualize the data in resource node and in the data package node? #26
Comments
The Map Component needs a study. It fetches the study area from the JSON API extracts the study area, EMIKAT internal ID of the study, and the data package resources relevant for the the current step. So, without study, no map. |
That's unfortunate. |
What's interesting is that resources have a spatial_extent variable - we just aren't using it. And it's not a geofield. For testing, I have added a geofield field "bounding box". Unfortunately, there is no widget to edit it on a map like https://boundingbox.klokantech.com/. Or maybe there is, but it's in "alpha" https://www.drupal.org/project/leaflet_widget So I entered some data per hand and the result is in principle OK This field could be used to initialize any map view, but entering the data is a PITA. Hiding it again - until better times... |
Unfortunately, the spatial extent is not enough. When retrieving data from the EMIKAT APIs, we need a |
In principle, this feature is now available. However, in order to activate it, I need access to data package uuid, resource uuid, etc. in the CSIS helpers Module. ATM I can just access the fields of the study group node. See clarity-h2020/csis-helpers-module#10 (comment) Furthermore, the respective Maps (node type: Extended iFrame) have to be included in the View Mode Forms. I tried it with the default study group edit form, which is usually not used by end users: But in the edit form, the map is not rendered automatically: Anyway, this is a map that shows all WMS Resources available in a data package that is associated with the study 3f3a0772-5d55-4f5b-9c7f-fe0a2321d11d. If clarity-h2020/csis-helpers-module#10 (comment) has been implemented, we can add such maps to data packages and single resources. |
I took a look at this, and I feel that we may need @fgeyer16 here. The preview is based on this node: https://csis.myclimateservice.eu/node/1032 The preview node can be included in a group, as shown here: https://csis.myclimateservice.eu/group/17/edit However, the preview of rendered entity in edit mode doesn't seem to work at all. E.g.: I suppose @fgeyer16 would need to look at this. Map works OK in standard view mode. I have enabled it now in the data view mode of the group @therter , @p-a-s-c-a-l : could you add a title of a currently active map layer in the view? |
I have tried to do the same with the data package, but it's currently not loading any layers. |
Yes, because there still only the study id available in `$entityInfo' of CSIS helpers. See clarity-h2020/csis-helpers-module#10 (comment)
Do you really want to show the map with all layers available? Because the layers are context dependent shown in the different steps, too.
No, that's not possible. Information on selected layers is not available in this context (3rd party library). |
@p-a-s-c-a-l : i have enabled it as a proof of concept. In my opinion, it would make far more sense to have this in the data package (in resource?) than in the study, but I added it to demonstrate that it works. |
I understand that this should more or less work now? |
yes |
I just noticed a ticked stating that that react components (data visualization widgets) need to be somehow changed (ticket in "map-component - #clarity-h2020/map-component#37).
This reminded me that it would be good to imediately visualize the contents of the resource and/or data package outside of a study. One advantage of this woudl be that the users who are adding resources/data packages would have imediate feedback on what they did and know if they did it correctly or not. Another would be that we would have a simpler & more flexible way to visualiize the data on the site - not hard coded for the needs of the study.
(1) How to add visualization widgets to nodes?
Adding a visualization widget to a dp_ressource and other node types would be relatively easy to do. Two possibilities:
I can easily add such functions, the only problem is this:
(2) How do our widgets know what data to show?
Ideally , our "visualization widgets" would be exactly the same for resources, for data packages and for the studies. Let's take the map widget for example:
I'm afraid that today they are looking at the path where they were called and then do some magic to get the relevant data for displaying it today. If they would e.g. look for some hidden variables on the page where they were called, it would be easier to make them work wherever necessary.
Example: a map widget could be passed the bounding box and a list of the resource node IDs and then show all the map layers from al lthe resources that it got at initialization time.
WDYT?
The text was updated successfully, but these errors were encountered: