This repository has been archived by the owner on Jun 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
demo.html
48 lines (47 loc) · 1.78 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body { font-family: Arial, sans-serif; font-size:13px; }
</style>
<link rel="stylesheet" href="jquery.geocodify.css"/>
<style>
#geocoder {
}
</style>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="http://underscorejs.org/underscore-min.js"></script>
<script type="text/javascript" src="jquery.geocodify.js"></script>
</head>
<body>
<div>
<h1>Headline here</h1>
<input id="geocoder" placeholder="Enter an address in L.A. city limits"></input>
<p>Text goes here and should appear under the dropdown when it shows up.</p>
</div>
<script type="text/javascript">
var maxY = 34.34343606848294;
var minY = 33.66263917576218;
var minX = -118.685302734375;
var maxX = -118.10302734375;
$("#geocoder").geocodify({
onSelect: function (result) {
console.log(result);
},
regionBias: 'US',
viewportBias: new google.maps.LatLngBounds(
new google.maps.LatLng(33.22030778968541,-118.948974609375),
new google.maps.LatLng(35.0120020431607,-117.44384765625)
),
filterResults: function(results) {
return _.filter(results, function(addy) {
return _.some(addy.address_components, function(component) {
return component.long_name === 'Los Angeles County';
});
});
}
});
</script>
</body>
</html>