From cff9fe4f7d7534cc6fc66032efc9161daa178324 Mon Sep 17 00:00:00 2001 From: Chris Arderne Date: Wed, 25 Jan 2023 15:09:26 +0000 Subject: [PATCH] Update style examples to match API.md (#1099) (h/t @carderne) --- docs/EXAMPLES.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/EXAMPLES.md b/docs/EXAMPLES.md index eb77f1480..dc9a8c95e 100644 --- a/docs/EXAMPLES.md +++ b/docs/EXAMPLES.md @@ -10,7 +10,9 @@ With this style, all Point features are blue and have a black halo when active. No other features are rendered, even if they are present. ```js -mapbox.Draw({ +var draw = new MapboxDraw({ + // other draw options here + // ... styles: [ { 'id': 'highlight-active-points', @@ -45,7 +47,9 @@ mapbox.Draw({ With this style, all line and polygon features are have dashed red outline and transparent fill while being drawn, including the point vertices. When the Draw mode is changed the 'static', these features will be drawn with solid black outline and transparent fill. Point vertices use the same point filter, and render these points twice: once as a larger-radius halo, and again as the vertex inset point. ```js -mapbox.Draw({ +var draw = new MapboxDraw({ + // other draw options here + // ... styles: [ // ACTIVE (being drawn) // line stroke