GeoNodeUserGroup-DE / contrib_datapackage

A geonode-importer handler to upload non-spatial data as datapackage
GNU General Public License v3.0
1 stars 0 forks source link

Bug: embedded share link of tabular-collection (map only containing tabular datasets) is refering to a map instead of tabular-collection #16

Open mwallschlaeger opened 4 months ago

mwallschlaeger commented 4 months ago

Image belows shows Embed this Map: linkes to map (https://172.18.0.1/maps/12/embed), should be tabular-collection (https://172.18.0.1/tabular-collection/12/embed), but /tabular-collection/12/embed is generally missing

image

mwallschlaeger commented 4 months ago

this is also part of the api entries for: "link": "https://172.18.0.1/api/v2/maps/12", and "embed_url": "https://172.18.0.1/maps/12/embed", for tabular-collection maps

ridoo commented 3 months ago

/tabular-collection/12/embed would require additional routing hooks in both geonode client hooksets and geonode-mapstore-client hooksets (which in fact is the implementation the former linked interface). Additionally, we would have to register new URLs in urls.py which serves at /tabular-collection or /tabular, respectively. This can be done via datapackage contrib app which had been created by https://github.com/GeoNodeUserGroup-DE/contrib_datapackage/issues/12.

For now, I have just "hacked" the existing embed routes for /datasets and /maps checking for subtype tabular. See here:

Image

However, extending the contrib app approach by adding url routes might provide cleaner integration/separation, but would require broader implemenation efforts (views, templating, database queries and the like). If you'd prefer to route via /tabular or /tabular-collection just let me know.