2.0_beta sync to rsa
[framework/web/web-ui-fw.git] / libs / js / jquery-geo-1.0a4 / docs / examples / empty.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta charset="utf-8">
5   <title>geomap empty test</title>
6   <meta name="description" content="Small test of jQuery Geo's shape functions">
7   <meta name="author" content="Ryan Westphal">
8   <meta name="viewport" content="width=device-width, initial-scale=1.0">
9   <link rel="stylesheet" type="text/css" href="css/style.css" />
10 </head>
11 <body>
12   <div>
13     <a href="../" class="docLink">&lt; docs</a>
14     <h1>
15       geomap empty test</h1>
16     <p>
17       Click the map to add points, click the Empty button to remove them all at once.</p>
18     <button type="button">
19       Empty</button>
20     <div class="geomap" style="width: 640px; height: 480px;">
21     </div>
22   </div>
23   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
24   <script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
25   <script>
26     $(function () {
27       var geomap = $(".geomap").geomap({
28         center: [-71.05, 42.35],
29         zoom: 13,
30         mode: "drawPoint",
31         shape: function (e, geo) {
32           geomap.geomap("append", geo);
33         }
34       });
35
36       $("button").click(function () {
37         geomap.geomap("empty");
38       });
39     });
40   </script>
41 </body>
42 </html>