Skip to content

Commit abe54fc

Browse files
committed
Exposed google maps settings, moved main AJAX request into function at the top, working on new taxonomy filtering setup - not functional yet
1 parent b991276 commit abe54fc

11 files changed

+619
-297
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
.idea/
12
node_modules/
23
cgi-bin/

Gruntfile.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ module.exports = function(grunt) {
8787
},
8888
src: {
8989
files: ['src/**/*'],
90-
tasks: ['less', 'concat', 'uglify', 'usebanner', 'cssmin']
90+
tasks: ['less', 'concat', 'uglify', 'usebanner', 'cssmin'],
91+
options: {
92+
spawn: false,
93+
livereload: true
94+
},
9195
},
9296
test: {
9397
files: '<%= jshint.test.src %>',

dist/categories-example.html

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Map Example - Categories</title>
5+
<meta charset="UTF-8">
6+
<link rel="stylesheet" type="text/css" href="css/storelocator.css" />
7+
</head>
8+
9+
<body>
10+
11+
<div class="bh-storelocator-container">
12+
<div id="page-header">
13+
<h1>Using Chipotle as an Example</h1>
14+
<p>I used locations around Minneapolis and the southwest suburbs. So, for example, Edina, Plymouth, Eden Prarie, etc. would be good for testing the functionality.
15+
You can use just the city as the address - ex: Edina, MN.</p>
16+
</div>
17+
18+
<div class="bh-storelocator-form-container">
19+
<form id="user-location" method="post" action="#">
20+
<div class="form-input">
21+
<label for="address">Enter Address or Zip Code:</label>
22+
<input type="text" id="address" name="address" />
23+
</div>
24+
25+
<button id="bh-storelocator-submit" type="submit">Submit</button>
26+
27+
<div class="bh-storelocator-filters-container">
28+
<h3>Categories</h3>
29+
30+
<ul id="category-filters-container1" class="bh-storelocator-filters">
31+
<li>
32+
<label>
33+
<input type="checkbox" id="category1" name="category1"> Restaurant
34+
</label>
35+
</li>
36+
<li>
37+
<label>
38+
<input type="checkbox" id="category2" name="category2"> Bar
39+
</label>
40+
</li>
41+
<li>
42+
<label>
43+
<input type="checkbox" id="category3" name="category3"> Cafe
44+
</label>
45+
</li>
46+
<li>
47+
<label>
48+
<input type="checkbox" id="category4" name="category4"> Bakery
49+
</label>
50+
</li>
51+
<li>
52+
<label>
53+
<input type="checkbox" id="category5" name="category5"> Coffee
54+
</label>
55+
</li>
56+
</ul>
57+
58+
<ul id="category-filters-container2" class="bh-storelocator-filters">
59+
<li>
60+
<label>
61+
<input type="checkbox" id="feature1" name="category1"> Fresh Guacamole
62+
</label>
63+
</li>
64+
<li>
65+
<label>
66+
<input type="checkbox" id="feature2" name="category2"> Online Ordering
67+
</label>
68+
</li>
69+
<li>
70+
<label>
71+
<input type="checkbox" id="feature3" name="category3"> Margaritas
72+
</label>
73+
</li>
74+
</ul>
75+
</div>
76+
</form>
77+
78+
</div>
79+
80+
<div class="bh-storelocator-map-container">
81+
<div class="bh-storelocator-loc-list">
82+
<ul class="list"></ul>
83+
</div>
84+
<div id="map" class="bh-storelocator-map"></div>
85+
</div>
86+
</div>
87+
88+
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
89+
<script src="js/handlebars.min.js"></script>
90+
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
91+
<script src="js/jquery.storelocator.js"></script>
92+
<script>
93+
$(function() {
94+
$('.bh-storelocator-map-container').storeLocator({
95+
'taxonomyFilters' : {
96+
'category' : '#category-filters-container1',
97+
'features' : '#category-filters-container2'
98+
}
99+
});
100+
});
101+
</script>
102+
103+
</body>
104+
</html>

dist/css/storelocator.css

Lines changed: 65 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,71 @@
2323
margin-top: 15px;
2424
width: 100%;
2525
}
26+
.bh-storelocator-container #search-form {
27+
clear: left;
28+
float: left;
29+
height: 60px;
30+
}
31+
.bh-storelocator-container .form-input {
32+
float: left;
33+
margin-top: 3px;
34+
}
35+
.bh-storelocator-container .form-input label {
36+
font-weight: bold;
37+
}
38+
.bh-storelocator-container .form-input input {
39+
padding: 4px;
40+
line-height: 16px;
41+
border: 1px solid #ccc;
42+
}
43+
.bh-storelocator-container #address {
44+
margin: 0 0 0 10px;
45+
}
46+
.bh-storelocator-container button {
47+
float: left;
48+
cursor: pointer;
49+
margin: 3px 0 0 10px;
50+
padding: 3px 6px;
51+
background: #ae2118;
52+
border: 1px solid #961f17;
53+
color: #fff;
54+
-webkit-border-radius: 4px;
55+
border-radius: 4px;
56+
}
57+
.bh-storelocator-container .bh-storelocator-loading {
58+
float: left;
59+
margin: 4px 0 0 10px;
60+
width: 16px;
61+
height: 16px;
62+
background: url(../img/ajax-loader.gif) no-repeat;
63+
}
64+
.bh-storelocator-container .bh-storelocator-filters-container {
65+
clear: both;
66+
float: left;
67+
width: 100%;
68+
margin: 15px 0;
69+
}
70+
.bh-storelocator-container .bh-storelocator-filters-container .bh-storelocator-filters {
71+
list-style: none;
72+
float: left;
73+
padding: 0;
74+
margin: 0 100px 0 0;
75+
}
76+
.bh-storelocator-container .bh-storelocator-filters-container .bh-storelocator-filters li {
77+
display: block;
78+
clear: left;
79+
float: left;
80+
width: 100%;
81+
margin: 5px 0;
82+
}
83+
.bh-storelocator-container .bh-storelocator-filters-container .bh-storelocator-filters li label {
84+
display: inline;
85+
}
86+
.bh-storelocator-container .bh-storelocator-filters-container .bh-storelocator-filters li input {
87+
display: block;
88+
float: left;
89+
margin: 2px 8px 2px 0;
90+
}
2691
.bh-storelocator-container .bh-storelocator-map-container {
2792
clear: left;
2893
float: left;
@@ -105,44 +170,6 @@
105170
color: #AD2118;
106171
font-weight: bold;
107172
}
108-
.bh-storelocator-container #search-form {
109-
clear: left;
110-
float: left;
111-
height: 60px;
112-
}
113-
.bh-storelocator-container .form-input {
114-
float: left;
115-
margin-top: 3px;
116-
}
117-
.bh-storelocator-container .form-input label {
118-
font-weight: bold;
119-
}
120-
.bh-storelocator-container .form-input input {
121-
padding: 4px;
122-
line-height: 16px;
123-
border: 1px solid #ccc;
124-
}
125-
.bh-storelocator-container #address {
126-
margin: 0 0 0 10px;
127-
}
128-
.bh-storelocator-container button {
129-
float: left;
130-
cursor: pointer;
131-
margin: 3px 0 0 10px;
132-
padding: 3px 6px;
133-
background: #ae2118;
134-
border: 1px solid #961f17;
135-
color: #fff;
136-
-webkit-border-radius: 4px;
137-
border-radius: 4px;
138-
}
139-
.bh-storelocator-container .bh-storelocator-loading {
140-
float: left;
141-
margin: 4px 0 0 10px;
142-
width: 16px;
143-
height: 16px;
144-
background: url(../img/ajax-loader.gif) no-repeat;
145-
}
146173
.bh-storelocator-container .bh-storelocator-map {
147174
float: left;
148175
width: 635px;

dist/css/storelocator.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/data/locations.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<marker name="Chipotle St. Louis Park" lat="44.930810" lng="-93.347877" category="Restaurant" address="5480 Excelsior Blvd." address2="" city="St. Louis Park" state="MN" postal="55416" country="US" phone="952-922-1970" email="info@chipotle.com" web="http://www.chipotle.com" hours1="Mon-Sun 11am-10pm" hours2="" hours3="" featured="" />
55
<marker name="Chipotle Minneapolis" lat="44.991565" lng="-93.216323" category="Restaurant" address="2600 Hennepin Ave." address2="" city="Minneapolis" state="MN" postal="55404" country="US" phone="612-377-6035" email="info@chipotle.com" web="http://www.chipotle.com" hours1="Mon-Sun 11am-10pm" hours2="" hours3="" featured="true" />
66
<marker name="Chipotle Golden Valley" lat="44.983935" lng="-93.380542" category="Restaurant" address="515 Winnetka Ave. N" address2="" city="Golden Valley" state="MN" postal="55427" country="US" phone="763-544-2530" email="info@chipotle.com" web="http://www.chipotle.com" hours1="Mon-Sun 11am-10pm" hours2="" hours3="" featured="" />
7-
<marker name="Chipotle Hopkins" lat="44.924363" lng="-93.410158" category="Restaurant" address="786 Mainstreet" address2="" city="Hopkins" state="MN" postal="55343" country="US" phone="952-935-0044" email="info@chipotle.com" web="http://www.chipotle.com" hours1="Mon-Sun 11am-10pm" hours2="" hours3="" featured="" />
7+
<marker name="Chipotle Hopkins" lat="44.924363" lng="-93.410158" category="Cafe" address="786 Mainstreet" address2="" city="Hopkins" state="MN" postal="55343" country="US" phone="952-935-0044" email="info@chipotle.com" web="http://www.chipotle.com" hours1="Mon-Sun 11am-10pm" hours2="" hours3="" featured="" />
88
<marker name="Chipotle Minneapolis" lat="44.973557" lng="-93.275111" category="Restaurant" address="1040 Nicollet Ave" address2="" city="Minneapolis" state="MN" postal="55403" country="US" phone="612-659-7955" email="info@chipotle.com" web="http://www.chipotle.com" hours1="Mon-Sun 11am-10pm" hours2="" hours3="" featured="" />
99
<marker name="Chipotle Minneapolis" lat="44.97774" lng="-93.270909" category="Restaurant" address="50 South 6th" address2="" city="Minneapolis" state="MN" postal="55402" country="US" phone="612-333-0434" email="info@chipotle.com" web="http://www.chipotle.com" hours1="Mon-Sun 11am-10pm" hours2="" hours3="" featured="" />
1010
<marker name="Chipotle Edina" lat="44.879826" lng="-93.321280" category="Restaurant" address="6801 York Avenue South" address2="" city="Edina" state="MN" postal="55435" country="US" phone="952-926-6651" email="info@chipotle.com" web="http://www.chipotle.com" hours1="Mon-Sun 11am-10pm" hours2="" hours3="" featured="" />

0 commit comments

Comments
 (0)