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

Is the geonode project type maintained? #9

Open
cwygoda opened this issue Jun 2, 2021 · 1 comment
Open

Is the geonode project type maintained? #9

cwygoda opened this issue Jun 2, 2021 · 1 comment

Comments

@cwygoda
Copy link

cwygoda commented Jun 2, 2021

Hi,

trying to set up a customized mapstore for Geonode I thought I might be able to keep it DRY by using this with the geonode type. The following tells me I might be chasing a dead end:

  • hard to figure out which version of this project (1.0.7) still provides a compatible webpack config for mapstore (v2021.01.03) - (should not specify master as a valid dependency version in package.json!)
  • imports in the theme.less files are still wrong after create
  • starting in dev mode blows up with react errors
  • only standard is listed in the README

If geonode project type is not maintained, please remove the dead code. And would be wonderful to document how to properly customize a current mapstore with current geonode. Happy to help!

Cheers,
Christian

@allyoucanmap
Copy link
Contributor

Hi @cwygoda,

A preliminary note, this repository is still in development and unstable. We are working to adapt mapstore project to this kind of structure but the development is not complete yet.

trying to set up a customized mapstore for Geonode I thought I might be able to keep it DRY by using this with the geonode type. The following tells me I might be chasing a dead end:

The geonode type were introduces to manage the official GeoNode/geonode-mapstore-client with the idea to centralize the script to compile and run the dev environment. The create script was introduced to make some initial tests on the possibility extend the geonode project but it's currently not mantained.

If you are using the stable branch of GeoNode 3.2.x the official suggested methods to customize the client are listed in the README. There are two level of customization:

  • localConfig.json where you can remove plugins listed in the different pages
  • custom fork/branch installation

While if you are working on GeoNode master we are exploring the possibility to use the mapstore extension as mechanism to add new plugins to the different MapStore container. The MapStoreExtension should allow to create a custom plugins and configure them with a json file. This should be the expected structure in a geonode-project

geonode-project/
|-- ...
|-- project-name/
|    |-- ...
|    +-- templates/
|         |-- ...
|         +-- geonode-mapstore-client/
|              +-- _geonode_config.html
|    +-- static/
|         |-- ...
|         +-- mapstore/
|              +-- extensions/
|                   |-- SampleExtension/
|                   |    |-- assets/
|                   |    |-- translations/
|                   |    +-- index.js
|                   +-- index.json
|-- ...

where:

  • geonode-project/project-name/static/mapstore/extensions/SampleExtension/ contain the unzipped compiled extension (sample downloade from the release)
  • geonode-project/project-name/static/mapstore/extensions/index.json declare the extension to add in mapstore app:
{
    "SampleExtension": {
        "bundle": "/static/mapstore/extensions/SampleExtension/index.js",
        "translations": "/static/mapstore/extensions/SampleExtension/translations",
        "assets": "/static/mapstore/extensions/SampleExtension/assets"
    }
}
  • geonode-project/project-name/templates/geonode-mapstore-client/_geonode_config.html modify the plugins configuration. For example the map_embed page
{% extends 'geonode-mapstore-client/_geonode_config.html' %}
{% block override_local_config %}
<script>
    window.__GEONODE_CONFIG__.overrideLocalConfig = function(localConfig, _) {
        localConfig.plugins.map_embed.push({ name: 'SampleExtension' });
        return localConfig;
    };
</script>
{% endblock %}

Now the /map/{pk}/emebed path should show the new plugin

image

If geonode project type is not maintained, please remove the dead code. And would be wonderful to document how to properly customize a current mapstore with current geonode. Happy to help!

We cannot remove all the code right now because we still need it in a specific context but maybe we could stop the creation of geonode project via script with a message. It could be helpfull if you could test the Extension approach described above. I just opened an issue on the geonode-mapstore-client repo to keep track of feedback and comments.

GeoNode/geonode-mapstore-client#225

Thanks for your feedback!

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

2 participants