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

GNIP-53: APIs to decouple import and load of GeoNode Client Libraries #3600

Closed
afabiani opened this issue Feb 7, 2018 · 0 comments
Closed
Assignees
Labels
gnip A GeoNodeImprovementProcess Issue
Milestone

Comments

@afabiani
Copy link
Member

afabiani commented Feb 7, 2018

Currently the load of a GIS client library on GeoNode, is done through a set of if - else statements on the templates, like, as an instance:

  {% if preview == 'geoext' %}
    {% include "layers/layer_geoext_map.html" %}
  {% elif preview == 'OL3' %}
    {% include "layers/layer_ol3_map.html" %}
  {% elif preview == 'react' %}
	{% include 'geonode-client/layer_map.html' %}
  {% else %}
    {% include "layers/layer_leaflet_map.html" %}
  {% endif %}

The proposal here would be to somehow include the client libraries from settings by dynamically loading the inclusion template headers through a custom tag library.

What I would like to achieve is something like changing the client library by simply adding the dependency to GeoNode and doing something like this on local settings

GEONODE_CLIENT_HOOKSET = "mygeonode.client.hooksets.MyNewReactHookSet"

and have the pages automatically switch the GIS client.

@afabiani afabiani self-assigned this Feb 7, 2018
@afabiani afabiani added maps gnip A GeoNodeImprovementProcess Issue labels Feb 7, 2018
afabiani pushed a commit that referenced this issue Feb 8, 2018
@afabiani afabiani added this to the 2.10 milestone Jun 25, 2019
@afabiani afabiani changed the title [GNIP] APIs to decouple import and load of GeoNode Client Libraries GNIP-53: APIs to decouple import and load of GeoNode Client Libraries Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gnip A GeoNodeImprovementProcess Issue
Projects
None yet
Development

No branches or pull requests

1 participant