Skip to content

Commit 75e0825

Browse files
author
corvis
committed
Added another example
1 parent 0f392e5 commit 75e0825

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

examples/simple.html

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head lang="en">
4+
<meta charset="UTF-8">
5+
<!-- Bootstrap stuff -->
6+
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
7+
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
8+
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
9+
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
10+
<script type="text/javascript" src='http://maps.google.com/maps/api/js?sensor=false&libraries=places'></script>
11+
<script src="../locationpicker.jquery.js"></script>
12+
<title>Simple example</title>
13+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
14+
</head>
15+
<body>
16+
<div class="form-horizontal" style="width: 550px">
17+
<div class="form-group">
18+
<label class="col-sm-2 control-label">Location:</label>
19+
20+
<div class="col-sm-10"><input type="text" class="form-control" id="us3-address"/></div>
21+
</div>
22+
<div class="form-group">
23+
<label class="col-sm-2 control-label">Radius:</label>
24+
25+
<div class="col-sm-5"><input type="text" class="form-control" id="us3-radius"/></div>
26+
</div>
27+
<div id="us3" style="width: 550px; height: 400px;"></div>
28+
<div class="clearfix">&nbsp;</div>
29+
<div class="m-t-small">
30+
<label class="p-r-small col-sm-1 control-label">Lat.:</label>
31+
32+
<div class="col-sm-3"><input type="text" class="form-control" style="width: 110px" id="us3-lat"/></div>
33+
<label class="p-r-small col-sm-2 control-label">Long.:</label>
34+
35+
<div class="col-sm-3"><input type="text" class="form-control" style="width: 110px" id="us3-lon"/></div>
36+
</div>
37+
<div class="clearfix"></div>
38+
<script>$('#us3').locationpicker({
39+
location: {latitude: 46.15242437752303, longitude: 2.7470703125},
40+
radius: 300,
41+
inputBinding: {
42+
latitudeInput: $('#us3-lat'),
43+
longitudeInput: $('#us3-lon'),
44+
radiusInput: $('#us3-radius'),
45+
locationNameInput: $('#us3-address')
46+
},
47+
enableAutocomplete: true,
48+
onchanged: function (currentLocation, radius, isMarkerDropped) {
49+
// Uncomment line below to show alert on each Location Changed event
50+
//alert("Location changed. New location (" + currentLocation.latitude + ", " + currentLocation.longitude + ")");
51+
}
52+
});</script>
53+
</div>
54+
</body>
55+
</html>

0 commit comments

Comments
 (0)