UNPKG

1.09 kBHTMLView Raw
1---
2layout: example.html
3title: Snap Interaction
4shortdesc: Example of using the snap interaction together with draw and modify interactions.
5docs: >
6 Example of using the snap interaction together with
7 draw and modify interactions. The snap interaction must be added
8 last, as it needs to be the first to handle the
9 <code>pointermove</code> event.</p>
10tags: "draw, edit, modify, vector, snap"
11---
12<div id="map" class="map"></div>
13<form id="options-form" automplete="off">
14 <div class="radio">
15 <label>
16 <input type="radio" name="interaction" value="draw" id="draw" checked>
17 Draw &nbsp;
18 </label>
19 </div>
20 <div class="radio">
21 <label>
22 <input type="radio" name="interaction" value="modify">
23 Modify &nbsp;
24 </label>
25 </div>
26 <div class="form-group">
27 <label>Draw type &nbsp;</label>
28 <select name="draw-type" id="draw-type">
29 <option value="Point">Point</option>
30 <option value="LineString">LineString</option>
31 <option value="Polygon">Polygon</option>
32 <option value="Circle">Circle</option>
33 </select>
34 </div>
35</form>