-
Notifications
You must be signed in to change notification settings - Fork 32
/
simple.html
64 lines (55 loc) · 2.32 KB
/
simple.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html lang="en">
<head>
<title>Leaflet.BlurredLocation</title>
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&language=en&key=AIzaSyDWgc7p4WWFsO3y0MTe50vF4l4NUPcPuwE"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="../node_modules/leaflet/dist/leaflet.css" rel="stylesheet">
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
<script src="../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="../dist/Leaflet.BlurredLocation.js"></script>
</head>
<body>
<!-- START OF EXAMPLE -->
<div class="container" >
<div class="row" >
<div class="col-md-8">
<label class="h2 font-size-big"><input type="radio" /> Add location to your content</label>
<br/><br/>
<h4 class="font-size-small">Option 1 : By Placename</h4>
</br>
<input id="placenameInput" type="text" class="form-control"><br/>
<h4 class="font-size-small">Option 2 : By dragging the map</h4></br>
<h4 class="font-size-small">Option 3 : By giving co-ordinates</h4></br>
<div class="col-md-6">
<input id="lat" type="text" class="form-control" placeholder="Latitude"><br/>
</div>
<div class="col-md-6">
<input id="lng" type="text" class="form-control" placeholder="Longitude"><br/>
</div>
</div>
<div class="col-md-4">
<h3 class="font-size-small">On a map : </h3>
<br />
<div id="map" class="leaflet-map" style="width: 400px; height: 400px;"></div>
<br/>
<h3 class="font-size-small">In Text:</h3><br/>
<input id="placenameDisplay" type="text" class="form-control"><br/>
</div>
</div>
</div>
<!-- END OF EXAMPLE -->
<script>
options = {}
// We can add Interface Options as follows:
InterfaceOptions = {};
InterfaceOptions.latId = 'lat';
InterfaceOptions.lngId = 'lng';
options.InterfaceOptions = InterfaceOptions;
var blurredLocation = new BlurredLocation(options);
blurredLocation.panMapToGeocodedLocation("placenameInput");
blurredLocation.gridSystem.removeGrid();
blurredLocation.disableCenterShade();
</script>
</body>
</html>