-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathindex.html
759 lines (701 loc) · 26.1 KB
/
index.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>mapsed.js - jQuery plug-in for Google Maps and Places API integration</title>
<!-- Bootstrap core CSS -->
<link href="ws/css/bootstrap.css" rel="stylesheet">
<!-- Core mapsed styles -->
<link href="mapsed.css" rel="stylesheet">
<!-- Add custom CSS here -->
<link href="ws/css/stylish-portfolio.css" rel="stylesheet">
<link href="ws/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="examples/examples.css" rel="stylesheet">
<link href="index.css" rel="stylesheet">
</head>
<body>
<div class="leader-banner">
<a href="https://toepoke.co.uk?mapsed=1">
<picture>
<source srcset="ws/img/leaderboard-banner.gif" media="(min-width: 728px)">
<img src="ws/img/leaderboard-banner-m.gif" alt="Lose the faff, bring back the fun with toepoke.co.uk">
</picture>
</a>
</div>
<!-- Side Menu -->
<a id="menu-toggle" href="#" class="btn btn-primary btn-lg toggle"><i class="fa fa-bars"></i></a>
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<a id="menu-close" href="#" class="btn btn-default btn-lg pull-right toggle"><i class="fa fa-times"></i></a>
<li class="sidebar-brand"><a href="https://toepoke.co.uk?ref=mapsed1">built by toepoke.co.uk</a></li>
<li><a href="#top">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#examples">Examples</a></li>
<li><a href="#code">Code & Dependencies</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
<!-- /Side Menu -->
<!-- Full Page Image Header Area -->
<div id="top" class="header">
<div class="vert-text">
<h1>Mapsed.js!</h1>
<h3>Google <em>maps</em> & <em>places</em> jQuery integration plug-in</h3>
<a href="#about" class="btn btn-default btn-lg">Find Out More</a>
</div>
</div>
<!-- /Full Page Image Header Area -->
<!-- Intro -->
<div id="about" class="intro">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3 text-center">
<h2>Google Map Picker</h2>
<p class="lead">
On <a href="https://toepoke.co.uk?ref=mapsed2">my little website</a> I need to allow users to
be able to <em>pick</em> somewhere to play football.
</p>
<p class="lead">
Couldn't really find anything that did what I was after (even
<a href="https://mapsengine.google.com/map/">Google Map Engine</a>
didn't quite do it)
so I built <em>mapsed.js</em><br />
(<strong>MAP</strong> <strong>S</strong>elect, <strong>E</strong>dit & <strong>D</strong>elete).
</p>
<p class="lead">
As well as <em>selecting</em> places, you can add/edit ones to integrate with your
own database; check out the examples to see what else it does.
</p>
</div>
</div>
</div>
</div>
<!-- /Intro -->
<!-- Callout -->
<div class="callout">
<div class="vert-text">
<h1>Show me the <strike>money</strike> demos ...</h1>
</div>
</div>
<!-- /Callout -->
<!-- Examples -->
<div id="examples" class="portfolio">
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4 text-center">
<h2>Examples</h2>
</div>
</div>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="portfolio-item">
<h3 class="text-center" id="loading-places">Loading Places</h3>
<p class="lead">
Here we're illustrating loading places from our own database,
and telling <em>mapsed</em> what places to draw
(via the <a href="https://github.com/toepoke/mapsed/blob/master/README.md#showonload-array">showOnLoad</a>
array).
</p>
<p class="lead">
The top marker stores a lookup to a <a href="https://github.com/toepoke/mapsed/blob/master/README.md#google-place">Google Place place_id</a>,
the bottom one stores a <a href="https://github.com/toepoke/mapsed/blob/master/README.md#custom-place">custom place</a> object.
</p>
<div id="custom-places" class="small-map"></div>
<p class="pull-right">
<a class="show-code">show/hide code illustration</a>
</p>
<div class="clearfix"></div>
<div class="code">
<pre class="prettyprint lang-js">
$("#custom-places").mapsed({
showOnLoad:
[
// City Varieties
{
// flag that this place should have the tooltip shown when the map is first loaded
autoShow: true,
// flags the user can edit this place
canEdit: false,
canDelete: false,
lat: 53.798823,
lng:-1.5426760000000286,
place_id: "ChIJQd3IwBtceUgRha6laiANoro"
},
// Random made up CUSTOM place
{
// flag that this place should have the tooltip shown when the map is first loaded
autoShow: true,
lat: 53.79,
lng:-1.5426760000000286,
name: "Somewhere",
street: "Over the rainbow, Up high way"
}
]
});
</pre>
</div>
<p class="lead">
So far, so uninteresting ☺
</p>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="portfolio-item">
<h3 class="text-center" id="picking-places">Place Picker</h3>
<p class="lead">
Ooooh, this time there's a <em>Select</em> button!
</p>
<div id="place-picker" class="small-map"></div>
<p class="pull-right">
<a class="show-code">show/hide code illustration</a>
</p>
<div class="clearfix"></div>
<div class="code">
<pre class="prettyprint lang-js">
$("#place-picker").mapsed({
// allow user to select somewhere
onSelect: function(mapsed, details) {
var msg =
"Name: " + details.name +
"Address: " +
details.street + ", " +
details.town + ", " +
details.area + ", " +
details.postCode +
"website: " + details.website +
"more: " + details.url +
"Tel: " + details.telNo
;
mapsed.showMsg("Place selected!", msg);
// indicate tip should be closed
return true;
},
showOnLoad:
// City Varieties
{
// flag that this place should have the tooltip shown when the map is first loaded
autoShow: true,
lat: 53.798823,
lng:-1.5426760000000286,
place_id: "ChIJQd3IwBtceUgRha6laiANoro"
},
// Defines header and footers to be applied to the
// ... select/edit/delete tooltips shown to the user
getHeaderTemplate: function(marker, isEditing) {
// You can have a different header for
// each "markerType". Supported customisations are:
// "custom" - Where your user has previously added a marker
// "add" - Where your user has click "add" to create a new marker
// "google" - Where your user has clicked on a marker found via Google Places APi
var markerType = marker.markerType;
var mode = (isEditing ? "edit" : "view");
return `<center>${markerType} ${mode} header</center>`.toUpperCase();
},
});
</pre>
</div>
<p class="lead">
The <em>Select</em> button is turned on simply by implementing
the <a href="https://github.com/toepoke/mapsed/blob/master/README.md#onselect">onSelect</a>
callback.
</p>
<p>
Note you can also add your own <a href="https://github.com/toepoke/mapsed/blob/master/README.md#Template-Customisations">headers & footers</a> too.
</p>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="portfolio-item">
<h3 class="text-center" id="adding-places">Adding Places</h3>
<p class="lead">
Being able to <em>Select</em> places is pretty useful,
but a waste of time if we can't create them!
</p>
<p class="lead">
This time we have a new icon at the
top-right of the map. Simply click <strong>+</strong>
to add a new place.
The marker can be dragged around to refine the location.
</p>
<p class="lead">
There's noddy validation support too, try hitting <em>Save</em>
without a <strong>Name</strong> property.
</p>
<div id="add-places" class="small-map"></div>
<p class="pull-right">
<a class="show-code">show/hide code illustration</a>
</p>
<div class="clearfix"></div>
<div class="code">
<pre class="prettyprint lang-js">
function updateDatabase(m, newPlace) {
var missing = [];
// detect errors starting at bottom
// ... we only have space for one error at a time, so this way we'll report
// ... from the top down
if (newPlace.postCode === "") missing.push("postcode");
if (newPlace.street === "") missing.push("street");
if (newPlace.name === "") missing.push("name");
// anything missing?
if (missing.length > 0) {
// return the error message so the callback doesn't progress
return "Required: " + missing.join();
}
if (newPlace) {
if (!newPlace.userData) {
// simulate a primary key being save to a db
newPlace.userData = parseInt(Math.random() * 100000);
}
var title = "";
var msg =
"userData: " + newPlace.userData +
"<br />name: " + newPlace.name +
"<br />street: " + newPlace.street + ", " +
newPlace.area + ", " +
newPlace.town + ", " + newPlace.postCode +
"<br />telNo: " + newPlace.telNo +
"<br />website: " + newPlace.website +
"<br />more: " + newPlace.url
;
if (newPlace.place_id) {
msg += "<br />Place_id: " + details.place_id
}
if (newPlace.markerType == "new") {
title = "New place added!";
} else {
title = "Place saved!";
}
m.showMsg(title, msg);
}
// indicate form was OK and saved
return "";
}
$("#add-places").mapsed({
// Enables edit of custom places (to your web application, not Google Maps!)
// ... again the presence of the callback enables the functionality
onSave: function(m, newPlace) {
return updateDatabase(m, newPlace);
},
// Adds the "+" button to the control bar at the top right of the map
// And wires up the save event for "new" places
onAddSave: function(m, newPlace) {
return updateDatabase(m, newPlace);
}
// .... >/snip<
});
</pre>
</div>
<p class="lead">
Notice once we've saved a place, we get an <em>Edit</em>
button to make changes.
</p>
<p class="lead">
Simply wire up the <a href="https://github.com/toepoke/mapsed/blob/master/README.md#onaddsave">onAddSave</a>
callback to save the new place. Wiring up the event also enables the icon
</p>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="portfolio-item">
<h3 class="text-center" id="deleting-places">Deleting Places</h3>
<p class="lead">
Completing our <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">cruddy</a>
demos we can <strong>delete</strong> places too.
</p>
<div id="delete-places" class="small-map"></div>
<p class="pull-right">
<a class="show-code">show/hide code illustration</a>
</p>
<div class="clearfix"></div>
<div class="code">
<pre class="prettyprint lang-js">
$("#delete-places").mapsed({
showOnLoad:
[
// City Varieties
{
autoShow: true,
canEdit: true,
canDelete: true,
lat: 53.798823,
lng:-1.5426760000000286,
name: "CITY Varieties Music Hall",
url: "https://plus.google.com/103655993956272197223/about?hl=en-GB",
website: "http://www.cityvarieties.co.uk/",
telNo: "0845 644 1881",
street: "Swan Street,",
town: "Leeds",
area: "West Yorkshire",
postCode: "LS1 6LW"
}
],
// Allows the user to delete a "custom" place they've previously
// ... added
onDelete: function(mapsed, placeToDelete) {
mapsed.showMsg(
"YOUR DELETE CODE HERE",
"<strong>" + placeToDelete.name + "</strong> has been removed."
);
// here would be code your application to do the actual delete
// return true to confirm it was deleted OK and remove marker from the map
// return false if the delete failed
return true;
},
// Flag that we want the user to confirm the delete before we actually do it
confirmDelete: true
});
</pre>
</div>
<p class="lead">
Enabling <em<>deletes</em> is simply a matter of implementing the
<a href="https://github.com/toepoke/mapsed/blob/master/README.md#ondelete">onDelete</a>
callback and the <strong>Delete</strong> button will appear when appropriate.
</p>
<p class="lead">
You can also ask the user to
<a href="https://github.com/toepoke/mapsed/blob/master/README.md#confirmdelete-bool">confirm the delete</a>
before they actually do it.
</p>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="portfolio-item">
<h3 class="text-center" id="searching-for-places">Searching for Places</h3>
<p class="lead">
All this viewing and editing <em>custom</em> places
is nice, but a bit limiting. “I want to hook-up
into <a href="https://developers.google.com/places/documentation/">Google's places API</a>!”
</p>
<div id="search-for-places" class="small-map"></div>
<p class="pull-right">
<a class="show-code">show/hide code illustration</a>
</p>
<div class="clearfix"></div>
<div class="code">
<pre class="prettyprint lang-js">
$("#search-for-places").mapsed({
// Adds a predictive search box
searchOptions: {
enabled: true,
initSearch: "Football in Leeds",
placeholder: "Search ..."
},
// allow user to select somewhere
onSelect: function(mapsed, details) {
var msg =
"name: " + details.name +
"street: " + details.street + ", " +
details.area + ", " +
details.town + ", " + details.postCode +
"telNo: " + details.telNo +
"website: " + details.website +
"more: " + details.url
;
mapsed.showMsg("You selected ...", msg);
// indicate tip should be closed
return true;
},
// shows additional instructions to the user
getHelpWindow: function(mapsed) {
var html =
"<div class='mapsed-help'>" +
"<h3>Find a venue</h3>" +
"<ol>" +
"<li>Simply use the <strong>search</strong> box to find a venue in your area.</li>" +
"<li>On the pop-up, click <strong>Select</strong> to pick a pitch.</li>" +
"</ol>" +
"<h3>New venues</h3>" +
"<ol>" +
"<li>Your venue isn't displayed? Simply click on the map where your pitch is.</li>" +
"<li>Fill in the details in the dialog.</li>" +
"<li>You can drag the marker around to pinpoint the right location.</li>" +
"<li>Once you're happy, click the <strong>OK</strong> button</li>" +
"</ol>" +
"</div>"
;
return html;
}
});
</pre>
</div>
<p class="lead">
Searching is enabled through the <a href="https://github.com/toepoke/mapsed/blob/master/README.md#searchoptions-object">searchOptions</a>
object (you simply flip a flag to enable it).
The <strong>More</strong> button returns the
<a href="https://developers.google.com/maps/documentation/javascript/places#PlaceSearchPaging">next 20 hits</a>.
</p>
<p class="lead">
Also notice that little <em>[?]</em> in the top-right corner of the
map? This brings up a window telling your users what
to do, and it's <a href="https://github.com/toepoke/mapsed/blob/master/README.md#gethelpwindow-string">configurable</a>
of course, and you can have it show
<a href="https://github.com/toepoke/mapsed/blob/master/README.md#showhelponload-bool">straight away</a>.
</p>
<p class="lead">
And finally a GEO location icon (⊗) has been added to move the map location to that of the
user's device, added simply by setting the <a href="https://github.com/toepoke/mapsed/blob/master/README.md#allowgeo-bool">allowGeo</a>
setting to <strong>true</strong>.
</p>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="portfolio-item">
<h3 class="text-center" id="database-integration">Database Integration</h3>
<p class="lead">
<a href="#loading-places">Loading places</a> on start-up is great for just placing
a few office locations on map. But if you have thousands of markers you'll need
be able to hook into your back-end database.
</p>
<p class="lead">
This is where the <a href="https://github.com/toepoke/mapsed/blob/master/README.md#onMapMoved">onMapMoved</a>
hook comes into play.
</p>
<div id="map-moved" class="small-map"></div>
<p class="pull-right">
<a class="show-code">show/hide code illustration</a>
</p>
<div class="clearfix"></div>
<div class="code">
<pre class="prettyprint lang-js">
$("#map-moved").mapsed({
onMapMoved: async function (north, south, east, west) {
var hits = [];
console.log("onMapMoved:", north, south, east, west);
if (!_sporadicPlaces) {
// emulate caching the result, or only hitting an in-memory array of results
var resp = await fetch("/data/sporadic-places.json");
_sporadicPlaces = await resp.json();
}
// Mimc back-end search for places within the boundary
for (var i = 0; i < _sporadicPlaces.length; i++) {
var place = _sporadicPlaces[i];
var withinLat = (place.lat >= south && place.lat <= north);
var withinLng = (place.lng >= west && place.lng <= east);
if (withinLat && withinLng) {
hits.push(place);
}
}
console.log("Found", hits);
return hits;
},
});
</pre>
</div>
<p class="lead">
In the example above there's no markers shown as the map isn't zoomed to a point
where there are any to display. Keep zooming out and all will be revealed.
</p>
<p class="lead">
For bonus points, open <strong>DevTools</strong>, and you'll see feedback as it
happens 😊.
</p>
</div>
</div>
</div>
<hr>
</div>
</div>
<!-- /Examples -->
<!-- Call to Action -->
<div class="call-to-action">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3 text-center">
<h3>Bringing it all together ...</h3>
<p>
One last feature is opening a map and taking
over the full window, plus an illustration of adding in more
controls (map style picker).
</p>
<p>
You'll notice a little <em>[X]</em>
at the top-right corner to close it when you've finished.
</p>
<a id="show-full-window" href="#" class="btn btn-lg btn-primary">Go full!</a>
<br />
<p>
... added advantage of <em>full window mode</em> is you don't even
need a <em>DIV</em> as a placeholder for the map!
</p>
<a href="https://github.com/toepoke/mapsed/blob/master/examples/06-full-example.js">see 06-full-example.js</a>
</div>
</div>
</div>
</div>
<!-- Intro -->
<div id="code" class="intro">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2 text-center">
<h2>Dependencies</h2>
<ul class="list-unstyled">
<li><a href="https://jquery.com/">jQuery</a> (10.2 used in development)</li>
<li><a href="https://developers.google.com/maps/">Google Maps API</a></li>
<li><a href="https://developers.google.com/places/">Google Places API (typically loaded with the Maps API)</a></li>
</ul>
<h2>Codebase</h2>
<p>
<em>Mapsed</em> was build to <a href="https://toepoke.co.uk?mapsed=2">fulfil a need</a>.
The code is up on <a href="https://github.com/toepoke/mapsed">Github</a>.
I wouldn't look ... the code's horrible, but the plug-in does the job.
</p>
<p>
Unlike the <a href="http://startbootstrap.com/stylish-portfolio">theme</a>
I've used to tell you about <em>mapsed</em> which is very nice and clearly build with love.
</p>
<h2>License</h2>
<p>
<em>Mapsed</em> is released under a “<a href="https://jquery.org/license/">Do what you like with it</a>” license.
</p>
</div>
</div>
</div>
</div>
<!-- /Intro -->
<!-- Footer -->
<footer>
<div id="contact" class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3 text-center">
<ul class="list-inline">
<li><a href="https://github.com/toepoke/mapsed"><i class="fa fa-github fa-3x"></i></a></li>
<li><a href="https://twitter.com/toepoke_co_uk"><i class="fa fa-twitter fa-3x"></i></a></li>
<li><a href="https://plus.google.com/+ToepokeCoUk"><i class="fa fa-google-plus fa-3x"></i></a></li>
<li><a href="https://www.facebook.com/toepoke"><i class="fa fa-facebook fa-3x"></i></a></li>
</ul>
<div class="top-scroll">
<a href="#top"><i class="fa fa-circle-arrow-up scroll fa-4x"></i></a>
</div>
<hr>
<p>Required by <a href="https://developers.google.com/maps/documentation/localsearch/">necessity</a>, built by <a href="http://toepoke.co.uk?mapsed=3">toepoke.co.uk</a></p>
<p>Lovely template provided by <a href="http://startbootstrap.com/stylish-portfolio">start Bootstrap</a></p>
<hr>
</div>
</div>
<div class="call-to-action small">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3 text-center">
<h3>Issues and Assistance</h3>
<p>
If you have any problems or questions, please raise them on <a href="https://github.com/toepoke/mapsed/issues?state=open">Github</a>.
You can find all the samples on <a href="http://plnkr.co/collections/plunker/public?tags=mapsed">Plunker</a> - feel free to fork one
for your issue.
</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10 col-md-offset-1 text-center">
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//mappy.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</div>
</div>
</footer>
<!-- /Footer -->
<!-- Dependencies -->
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=[YOUR-API-KEY]"></script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script src="ws/js/jquery-1.10.2.js"></script>
<script src="ws/js/bootstrap.js"></script>
<!-- Mapsed JavaScript -->
<script src="mapsed.js"></script>
<script src="mapsed.debug.js"></script>
<!-- Examples JavaScript -->
<script src="examples/mapsed-storage.js"></script>
<script src="examples/01-custom-places-example.js"></script>
<script src="examples/02-place-picker-example.js"></script>
<script src="examples/03-add-places-example.js"></script>
<script src="examples/04-delete-places-example.js"></script>
<script src="examples/05-search-for-places-example.js"></script>
<script src="examples/07-map-moved-example.js"></script>
<script src="examples/06-full-example.js"></script>
<!-- Custom JavaScript for the Side Menu and Smooth Scrolling -->
<script>
$("#menu-close").click(function(e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active");
});
</script>
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active");
});
</script>
<script>
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|| location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
</script>
<script>
try {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-1524341-6', 'auto');
ga('send', 'pageview');
}
catch (e) {
}
</script>
<script>
$(document).ready(function() {
$(".show-code").on("click", function() {
event.preventDefault();
$(this).parent().parent().find(".code").slideToggle("fast");
});
});
</script>
</body>
</html>