Skip to content
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

Handle new GeoApps more flexible #1325

Open
ridoo opened this issue Nov 25, 2022 · 1 comment
Open

Handle new GeoApps more flexible #1325

ridoo opened this issue Nov 25, 2022 · 1 comment

Comments

@ridoo
Copy link

ridoo commented Nov 25, 2022

Dear GeoNode Community, I am working on a GeoNode App which adds a new GeoApp "externalapplication" (see GNIP-78: GeoNode/geonode#6684).

On the GeoNode backend this works actually quite well and I was able to separate all my code from GeoNode core. Also, I added some configuration overrides for MapStore-Client to add a filter and a new item in the "Add resource" dropdown list.

However, the MapStore-Client cannot handle the unknown resource type properly. The Button in the DetailsPanel only gets an empty metadata details URL and does nothing when a users clicks on it. I will have to add the new resource type to the resource type infos to make it known to MapStore-Client.

I am not 100% sure how to proceed for the MapStore UI. Hard-wireing the new resource type in the mapstore-client code seems to be quite hacky to make it work. Is there a way to create a plugin / extension from within my "externalapplication" app ( I was hoping to have all my adjustments in one place)? If there is such a way (any hints welcome), this would still require to change the way getResourceTypesInfo = () => ({ ... }) is providing resource types (e.g. serving a exported const dict to make it extensible):

export const ResourceTypesInfos = {
  [ResourceTypes.DATASET]: {
  // ...
}

export const getResourceTypesInfo = () => ResourceTypesInfos;

Do you see a better way to handle new resource types from within MapStore-Client in general?

Looking forward to read your shared thoughts.

@ridoo
Copy link
Author

ridoo commented Nov 25, 2022

The issue about using MapStoreExtension to extend the list of plugins seems to describe how to provide a mapstore extension via GeoNode. I am not sure if this would work, or if that mechanism could also work for extensions served from a contrib app. @allyoucanmap Do you have any thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant