earthworks icon indicating copy to clipboard operation
earthworks copied to clipboard

Add autogenerated code samples for using layers

Open thatbudakguy opened this issue 8 months ago • 4 comments

You can view this prototype by visiting the interactive prototype, visiting a layer detail page, and clicking "code samples" in the tools panel.

This deserves a little bit of thought with regard to maintainability: do we just have the code samples as string templates that get the layer ID, etc. injected into them? Do we do any work to validate that the code still runs/is up to date? Can they be tested? etc.

If directly writing out the code isn't the best way, perhaps step-by-step instructions or links would still be helpful. @mapninja is a good person to ask about how this will be used in practice (e.g. by students).

thatbudakguy avatar Jun 07 '24 18:06 thatbudakguy