diff --git a/guides/GETTING_STARTED.md b/guides/GETTING_STARTED.md index 80decf68..69b44b6a 100644 --- a/guides/GETTING_STARTED.md +++ b/guides/GETTING_STARTED.md @@ -13,11 +13,30 @@ npm install terra-draw Be aware Terra Draw is currently in alpha, the initial API is still being finalised. It is strongly advised to pin your installation to a specific version i.e. not using carat, asterix or tilde for versions but giving a version explicitly in your `package.json` ``` - "terra-draw": "0.0.1-alpha.22" + "terra-draw": "0.0.1-alpha.47" ``` Once terra-draw is out of alpha this suggestion will be removed as we will aim to move to semantic versioning. +## Script Tag + +Some people may want to experiment with using Terra Draw without a build step. To do this you can use the UMD bundle that is put onto npm via a CDN like unpkg. For example if we were using Terra Draw with MapLibre we might do something like this in our `` tag: + +```html + + + +``` + +Later on in our JavaScript code we can access the global `terraDraw` like so: + +```javascript + const td = new terraDraw.TerraDraw({ + adapter: new terraDraw.TerraDrawMapLibreGLAdapter({ map }), + modes: [new terraDraw.TerraDrawRectangleMode()] + }); +``` + ## API Docs You can find the full autogenerated [API docs on the terra draw website](https://terradraw.io/#/api)