Skip to content

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

@afabiani

Description

@afabiani

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.

Metadata

Metadata

Assignees

Labels

gnipA GeoNodeImprovementProcess Issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions