Open twelch opened 1 year ago
It looks like I was incorrect about SeaSketch not providing the initial layer visibility. Looks like it is passed in the initial message. What's missing is updating the report view's state if the user toggles via the main table of contents. That would require a substantial amount of spaghetti code to support in legacy but shouldn't be a big deal in SSN.
Because seasketch legacy didn't send full sketch properties over the iframe API, for the last few projects gp functions send the full sketch structure (sans geometry to keep it small) back with the metric result. This was very handy for the FSM project, where we needed to inject contiguous zone polygons as extra sketches at the top of the function. Reports were then able to include these zone polygons in the displayed result.
Now that seasketch next sends full sketch properties (to be confirmed), a way forward might be for reports to go back to defaulting to using the full sketch properties passed via the iFrame, but if there is a sketch present in the gp results, then that should override.
Geoprocessing projects need to support SeaSketch Next and any changes/improvements to the IFrame API. Some of the features may be already implemented and not used, or at least stubbed in the interface.
Requirements
GP client library must maintain compatibility with Seasketch legacy
Breaking changes to iframe API should be minimized
IFrame API should support sending initial layer state (layer IDs with boolean)
IFrame API should support sending layer toggle events from either seasketch client or report client (layer ID + toggle)
IFrame API should support sending full properties of sketch on init, including properties of individual sketches within a sketch collection (client uses this for determining protection levels, etc)
GP client references: