/
empty.html
42 lines (41 loc) · 1.2 KB
/
empty.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>geomap empty test</title>
<meta name="description" content="Small test of jQuery Geo's shape functions">
<meta name="author" content="Ryan Westphal">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div>
<a href="../" class="docLink">< docs</a>
<h1>
geomap empty test</h1>
<p>
Click the map to add points, click the Empty button to remove them all at once.</p>
<button type="button">
Empty</button>
<div class="geomap" style="width: 640px; height: 480px;">
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
<script>
$(function () {
var geomap = $(".geomap").geomap({
center: [-71.05, 42.35],
zoom: 13,
mode: "drawPoint",
shape: function (e, geo) {
geomap.geomap("append", geo);
}
});
$("button").click(function () {
geomap.geomap("empty");
});
});
</script>
</body>
</html>