earthworks
earthworks copied to clipboard
Add autogenerated code samples for using layers
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).