summaryrefslogtreecommitdiff
path: root/misc/openlayers/examples/donut.html
blob: 4142b75d53ef5c0afc8d857f7cb10143eb103e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <title>OpenLayers Polygon Hole Digitizing</title>
        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
        <link rel="stylesheet" href="style.css" type="text/css">
        <style>
            #controlToggle li {
                list-style: none;
            }
            .olControlAttribution {
                font-size: 9px;
                bottom: 2px;
            }
            #output {
                margin: 1em;
                font-size: 0.9em;
            }
        </style>
    </head>
    <body>
        <h1 id="title">Drawing Holes in Polygons</h1>
        <div id="tags">
            draw polygon hole
        </div>         
        <p id="shortdesc">
            The DrawFeature control can be used to digitize donut polygons.
        </p>
        
        <div id="map" class="smallmap"></div>
        <ul id="controlToggle">
            <li>
                <input type="radio" name="type" value="none" id="noneToggle"
                       onclick="toggleControl(this);" checked="checked">
                <label for="noneToggle">navigate</label>
            </li>
            <li>
                <input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);">
                <label for="polygonToggle">draw polygon</label>
            </li>
        </ul>
        <div id="output"></div>
        <div id="docs">
            <p>
                To digitize holes in polygons, hold down the <code>Alt</code> 
                key and draw over an existing polygon.  By default, the 
                <code>Shift</code> key triggers freehand drawing.  Use a 
                combination of the <code>Shift</code> and <code>Alt</code> keys
                to digitize holes in freehand mode.
            </p>
            <p>
                See the <a href="donut.js" target="_blank">
                donut.js source</a> for details on how this is done.
            </p>
        </div>
        <script src="../lib/OpenLayers.js"></script>
        <script src="donut.js"></script>
    </body>
</html>