Skip to content

Commit

Permalink
doc: updated maplibre-gl-terradraw plugin example (#4676)
Browse files Browse the repository at this point in the history
  • Loading branch information
JinIgarashi authored Sep 8, 2024
1 parent 18b844a commit 6e16229
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions test/examples/maplibre-gl-terradraw.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
</head>
<body>

<script src="https://cdn.jsdelivr.net/npm/@watergis/maplibre-gl-terradraw@0.0.3/dist/maplibre-gl-terradraw.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@watergis/maplibre-gl-terradraw@0.1.1/dist/maplibre-gl-terradraw.umd.js"></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@watergis/maplibre-gl-terradraw@0.0.3/dist/maplibre-gl-terradraw.css"
href="https://cdn.jsdelivr.net/npm/@watergis/maplibre-gl-terradraw@0.1.1/dist/maplibre-gl-terradraw.css"
/>
<div id="map"></div>

Expand All @@ -33,14 +33,17 @@
// By default, all terra-draw drawing modes are enabled.
// you can disable some of modes in the constructor options if you want.
const draw = new MaplibreTerradrawControl({
point: true,
line: true,
polygon: true,
rectangle: true,
circle: true,
freehand: true,
angledRectangle: true,
select: true
modes: [
'point',
'linestring',
'polygon',
'rectangle',
'angled-rectangle',
'circle',
'freehand',
'select'
],
open: true,
});
map.addControl(draw, 'top-right');
</script>
Expand Down

0 comments on commit 6e16229

Please sign in to comment.