Description
Extend the GeoNode catalog so selecting a map resource imports the layers/group content into the current map: all of the map's layers, preserving its group hierarchy, nested under a new parent group named after the map (background layers should be excluded).
Mixed selections keep working in a single add: datasets become one layer each, documents become one vector layer, maps become layers + groups.
Example: 1 dataset + 1 map (4 layers in 2 groups) produces 1 dataset layer + 4 map layers grouped under a new map title parent group.
This uses the catalog processRecords API, which returns { layers, groups } and lets a service expand one selected record into multiple layers and groups; the container applies groups before layers.
Acceptance criteria
Other useful information
Implementation outline
processRecords (api/catalog/GeoNode.js) gains a map branch routing maps to a new buildMapContent(record, options); the method still returns { layers, groups }.
buildMapContent (utils/GeoNodeUtils.js): fetch the full map by pk if needed, read data.map.layers/data.map.groups, create a fresh parent group (id = uuid(), title = record.title), re-id and re-home every layer/group under it, and return { layers, groups }
Description
Extend the GeoNode catalog so selecting a map resource imports the layers/group content into the current map: all of the map's layers, preserving its group hierarchy, nested under a new parent group named after the map (background layers should be excluded).
Mixed selections keep working in a single add: datasets become one layer each, documents become one vector layer, maps become layers + groups.
Example: 1 dataset + 1 map (4 layers in 2 groups) produces 1 dataset layer + 4 map layers grouped under a new
map titleparent group.This uses the catalog
processRecordsAPI, which returns{ layers, groups }and lets a service expand one selected record into multiple layers and groups; the container applies groups before layers.Acceptance criteria
mapin its resource types, and maps appear in the results list.processRecordsand the re-homing logic.Other useful information
Implementation outline
processRecords(api/catalog/GeoNode.js) gains amapbranch routing maps to a newbuildMapContent(record, options); the method still returns{ layers, groups }.buildMapContent(utils/GeoNodeUtils.js): fetch the full map by pk if needed, readdata.map.layers/data.map.groups, create a fresh parent group (id = uuid(),title = record.title), re-id and re-home every layer/group under it, and return{ layers, groups }