-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
1224 lines (1153 loc) · 71.4 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
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- SEO Meta Tags -->
<meta name="description" content="Northumberland County is looking for new ways to visualize the food distribution supply chain, click to find out more!">
<meta name="author" content="Web Charlie">
<!-- OG Meta Tags to improve the way the post looks when you share the page on LinkedIn, Facebook, Google+ -->
<meta property="og:site_name" content="" /> <!-- website name -->
<meta property="og:site" content="" /> <!-- website link -->
<meta property="og:title" content=""/> <!-- title shown in the actual shared post -->
<meta property="og:description" content="" /> <!-- description shown in the actual shared post -->
<meta property="og:image" content="" /> <!-- image link, make sure it's jpg -->
<meta property="og:url" content="" /> <!-- where do you want your post to link to -->
<meta name="twitter:card" content="summary_large_image">
<!-- Webpage Title -->
<title>Sustainable Cobourg Web Map</title>
<!-- Mapbox Script and style-->
<script src="https://api.mapbox.com/mapbox-gl-js/v1.8.1/mapbox-gl.js"></script>
<!-- Styles -->
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap" rel="stylesheet">
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/fontawesome-all.css" rel="stylesheet">
<link href="css/swiper.css" rel="stylesheet">
<link href="css/magnific-popup.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<link href="https://api.mapbox.com/mapbox-gl-js/v1.8.1/mapbox-gl.css" rel="stylesheet" />
<!-- leaflet style -->
<!-- lets load Leaflet's .js and .css from CDN-->
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""
/>
<script
src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""
></script>
<!-- Load Esri Leaflet from CDN. it has no .css stylesheet of its own, only .js -->
<script
src="https://unpkg.com/[email protected]/dist/esri-leaflet.js"
integrity="sha512-JmpptMCcCg+Rd6x0Dbg6w+mmyzs1M7chHCd9W8HPovnImG2nLAQWn3yltwxXRM7WjKKFFHOAKjjF2SC4CgiFBg=="
crossorigin=""
></script>
<!-- Favicon -->
<link rel="icon" href="images/favicon.png">
</head>
<body data-spy="scroll" data-target=".fixed-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg fixed-top navbar-dark">
<div class="container">
<!-- Text Logo - Use this if you don't have a graphic logo -->
<a class="navbar-brand logo-text page-scroll" href="index.html">Web Charlie</a>
<!-- Image Logo -->
<a class="navbar-brand logo-image" href="index.html"><img src="images/logo.webp" alt="alternative"></a>
<button class="navbar-toggler p-0 border-0" type="button" data-toggle="offcanvas">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse offcanvas-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link page-scroll" href="#details">Project <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#journey">Journey</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#solution">Solution</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#methods">Methodology</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#about">About</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#contact">Contact</a>
</li>
</ul>
<span class="nav-item social-icons">
<span class="fa-stack">
<a href="https://www.facebook.com/SustainableCobourg" target="_blank">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-facebook-f fa-stack-1x"></i>
</a>
</span>
<span class="fa-stack">
<a href="https://twitter.com/greencobourg?lang=en" target="_blank">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-twitter fa-stack-1x"></i>
</a>
</span>
</span>
</div> <!-- end of navbar-collapse -->
</div> <!-- end of container -->
</nav> <!-- end of navbar -->
<!-- end of navigation -->
<!-- Header -->
<div class="header">
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
<div class="container">
<div class="row">
<div class="col-lg-6">
<div class="text-container">
<h1 class="h1-large">Web Charlie Uses Map box and WebGIS to Visualize Northumberland County Food Supply</h1>
<p class="p-large">Now the Northumberland County residents have a reliable and updated web map to locate food banks.</p>
<a class="btn-solid-lg page-scroll" href="#details">Discover</a>
</div> <!-- end of text-container -->
</div> <!-- end of col -->
<div class="col-lg-6">
<div class="image-container">
<!-- The big image here was removed, we can put our own hero image for landing -->
<img class="img-fluid" src="images/header-gem.svg" alt="alternative">
<!-- <a class="navbar-brand logo-image" href="index.html"><img src="images/logo.webp" alt="alternative"></a> -->
</div> <!-- end of image-container -->
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of header -->
<!-- Details 1 -->
<div id="details" class="basic-3">
<div class="container">
<div class="row">
<!-- end of col -->
<!-- <div class="col-lg-6 col-xl-5"> -->
<div class="text-container">
<h2>Problem Background</h2>
<p>
Currently in the municipality of Northumberland County there are no effective web-based applications that users can rely on to find fresh, local food. In March 2020, all thirteen Northumberland County food banks closed except for one location due to COVID-19 restrictions. This led to a disruption to the food distribution supply chain and confusion to food bank users. There was mass confusion about which food bank was still available, and which ones were closed. The confusion from the shutdown affected the vulnerable population and led to people not having access to food. With a current collaborative project partnered with Sustainable Cobourg underway, Web Charlie plans on bringing a new web-based food accessibility tool and solution to Northumberland County residents.
</p>
<div class="image-container basic-5">
<!-- <img id="north-county" class="img-fluid" src="images/northumberland-social.jpg" alt="alternative"> -->
<img class="img-fluid" src="images/StudyAreaFinal.jpg" width="600" alt="Northumberland County Study Area" >
<figcaption class="figure-caption">Northumberland County has 7 municipalities and it's located in Ontario, Canada</figcaption>
</div>
<br>
<h3>Problem Statement</h3>
<p class="p-large">Our goal is to set out and create a web map with local fresh food locations that is accessible to users on a responsive mobile platform.</p>
<ul class="list-unstyled li-space-lg">
<li class="media">
<p class="p-large"><strong>Ideal: </strong> Users can go online in a mobile friendly web map to find fresh foods in the Cobourg area.</p>
</li>
<li class="media">
<p class="p-large"><strong>Reality: </strong> There is no web platform available for food availability in the Cobourg area.</p>
</li>
<li class="media">
<p class="p-large"><strong>Consequences: </strong> Users continue to lack support in finding food and failure to access food resources.</p>
</li>
<li class="media">
<p class="p-large"><strong>Proposal: </strong> Create a food bank web map that is accessible to users on a responsive mobile platform.</p>
</li>
</ul>
<div class="image-container basic-5">
<img id="north-county" class="img-fluid" src="images/northumberland-social.jpg" alt="Ranney Gorge Suspension Bridge">
<!-- <img class="img-fluid" src="images/Northumberland3.PNG" alt="Northumberland County Study Area"> -->
<figcaption class="figure-caption">Northumberland County: Strength Honour and Beauty</figcaption>
</div>
</div>
<!-- end of text-container -->
</div>
<!-- end of col -->
</div>
<!-- end of row -->
</div>
<!-- end of container -->
</div>
<!-- end of basic-2 -->
<!-- end of details 1 -->
<!-- Journey -->
<div id="journey" class="basic-3">
<div class="container">
<div class="row">
<!-- <div class="col-lg-4"> -->
<div class="text-container">
<h2>Our Journey </h2>
<p>Over the span of couple weeks, our team tried different ways to implement the web solution. We came across some problems along the way and tried to find workarounds for our final product. This section will detail what we have tried and what we did to overcome the issue.</p>
<h4>Phase One: Mapbox & GeoJSON</h4>
<p>From our friend Sustainable Cobourg’s ArcGIS Online Web Map, we were able to find a feature service layer at their <a href="https://services3.arcgis.com/KJrsq5lsoZHRcF4w/ArcGIS/rest/services/Food_Banks/FeatureServer/0" target="blank"><b></b> ArcGIS REST Services Directory</a>. We looked at using the query function within the query to get a web response that matches what Mapbox can intake. We made sure to use an SQL query <b><i>“Name IS NOT NULL” </i></b> to make sure we selected all the food banks. The advantage of this method is being able to get point data as well as the description directly from the ArcGIS Online source, instead of having to make manual changes every time Sustainable Cobourg updates their feature layer.</p>
<p><b>Problem: </b>The team attempted to use the GeoJSON queried directly from the feature service via the REST endpoint, but it was unsuccessful due to the fact it is not native to Mapbox and required heavy request modification.</p>
<p>The issue was that the web request to the feature service layer was not configured properly and they could not be projected on the Mapbox.</p>
<div class="image-container">
<p></p> <!-- Need a line break here-->
<img class="img-fluid" src="images/feature-service2.jpg" width="600" alt="Web Response From Dev Tools">
<figcaption class="figure-caption">Our expected response was not correct!</figcaption>
<p></p> <!-- Need a line break here-->
</div>
<p>From here we extracted the GeoJSON using a query to place into Mapbox map. Markers showed up and our next issue were the pop-up windows. Through Mapbox tutorials and research, we figured out the solution to display the specific attributes that we wanted from the properties section. We needed to configure the code from the tutorial slightly to fit our requirements and needs.</p>
<p><b>Problem: </b>What we had trouble with was changing the marker symbols so that they cluster properly.</p>
<hr>
<h4>Phase Two: Mapbox</h4>
<p>Our goal is to automate the updated Foodbanks layer from ArcGIS Online and have that linked to the Mapbox map, where we won’t need to query for the GeoJSON and paste into Mapbox every time we have a new updated point. We want to be able to paste the REST endpoint URL into Mapbox instead of using GeoJSON. We are still figuring out the correct formatting to achieve this. This leads us to phase three, trying a different platform.</p>
<div class="image-container">
<p></p> <!-- Need a line break here-->
<img class="img-fluid" src="images/mapboxMap.PNG" width="600" alt="Pop ups in Mapbox">
<figcaption class="figure-caption">A view of pop ups in Mapbox</figcaption>
<hr>
<a href="https://github.com/jimhwei/webgis-web-charlie/blob/main/README.md">
<img class="img-fluid" src="images/readme.JPG" alt="Read me">
</a>
<p></p> <!-- Need a line break here-->
<a href="https://github.com/jimhwei/webgis-web-charlie/blob/main/README.md">
<img class="img-fluid" src="https://camo.githubusercontent.com/0eb73a0b27fdd2252fe006e8a24d975990e6e37ca45bfdff37484be0a312d083/68747470733a2f2f646f63732e6d6170626f782e636f6d2f68656c702f696d672f73747564696f2f706f696e742d7475746f7269616c2d646174617365742d656469742e676966" alt="Read me">
</a>
<figcaption class="figure-caption">An alternative way on generating the data in backend. View this <a href="https://github.com/jimhwei/webgis-web-charlie/blob/main/README.md">readme on GitHub</a> </figcaption>
<p></p> <!-- Need a line break here-->
</div>
<hr>
<h4>Phase Three: Leaflet</h4>
<p>Progressing with the project we looked for other ways we could improve the usability of our map in a mobile friendly way. We turned to Leaflet to see how they implement feature layer as a URL. From <a href="https://esri.github.io/esri-leaflet/tutorials/create-your-first-app.html" target="blank"><b>this tutorial</b></a>, we were able to achieve pasting the REST endpoint URL and adding it to the map.
From there, we added the <a href="https://esri.github.io/esri-leaflet/examples/feature-layer-popups.html" target="blank"><b>pop-up windows</b></a> and the properties that we wanted to display just to try.</p>
<div class="image-container">
<p></p> <!-- Need a line break here-->
<img class="img-fluid" src="images/leafletMap.PNG" width="600" alt="Web Response From Dev Tools">
<figcaption class="figure-caption">Leaflet view with data straight from the feature service URL</figcaption>
<p></p> <!-- Need a line break here-->
</div>
<hr>
<h4>Next Steps</h4>
<p>Leaflet is an open-source JavaScript library and can be enhanced with different web applications such as Mapbox, OpenStreetMap, and Esri suite. It is a native environment that adapts with Esri products seamlessly. Our next steps include adding more customized map elements so that it has even better aesthetic appeal for a wide audience. </p>
</div> <!-- end of text-container -->
<!-- </div> end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of basic-5 -->
<!-- end of about -->
<!-- Changes to be implemented below this line -->
<!-- Details 1 -->
<div id="solution" class="basic-3">
<div class="container">
<div class="text-container">
<h2>Our Mapbox Solution </h2>
</div>
<div class="row">
<div class="col-lg-6 col-xl-7">
<div class="image-container">
<div id="map"></div>
<img class="img-fluid" src="images/details-1.svg" alt="alternative">
</div> <!-- end of image-container -->
</div> <!-- end of col -->
<div class="col-lg-6 col-xl-5">
<div class="text-container">
<h3>The Interactive Web Map</h3>
<p>At the height of Covid-19 pandemic around March 2020, the Northumberland County witnessed
the consequences of food deserts in their municipality on their citizens. The lack of access to fresh food
for food insecure persons led to Sustainable Cobourg’s call to action – to create an interactive web friendly map for users and organizations to set up optimal locations for pop-up food distribution sites. </p>
<ul class="list-unstyled li-space-lg">
<li class="media">
<div class="media-body"><strong>Food Banks</strong> Regularly updated data for Food Bank location and information to increase food availability. </div>
</li>
<li class="media">
<div class="media-body"><strong>Responsive Design</strong> This website is responsive! You can resize the screen and view this solution on your mobile phone! To view it in full screen, click the blue button below.</div>
</li>
<hr>
<li class="media">
<div class="media-body"><strong>Web Tier</strong> Mapbox </div>
</li>
<li class="media">
<div class="media-body"><strong>Middle Tier</strong> Mapbox Studio </div>
</li>
<li class="media">
<div class="media-body"><strong>Data Tier</strong> GeoJSON embedded on website </div>
</li>
</ul>
<!-- Shutting down the button until it's been fixed -->
<a class="btn-solid-reg" target="blank" href="solution.html">Launch Mapbox in Full Screen</a>
</div> <!-- end of text-container -->
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of basic-2 -->
<!-- end of details 1 -->
<!-- Alternative Leaflet solution -->
<!-- Details 1 -->
<div class="basic-3">
<div class="container">
<div class="text-container">
<h2>Our Esri Leaflet Solution </h2>
</div>
<div class="row">
<div class="col-lg-6 col-xl-7">
<div class="image-container">
<a href="alt-solution-leaflet.html">
<img class="img-fluid" style="position: absolute; top: 0; bottom: 0; right: 30px; width: 100%; height:100%" src="images/leaflet.PNG" alt="alternative">
<img class="img-fluid" src="images/details-1.svg" alt="alternative">
</a>
</div> <!-- end of image-container -->
</div> <!-- end of col -->
<div class="col-lg-6 col-xl-5">
<div class="text-container">
<h3>The Alternative Web Map</h3>
<p>The primary Mapbox solution requires manual updating. The team thought it would be interesting to provide an alternative solution using Esri leaflet. This solution leverages the feature service directly from Sustainable Cobourg’s ArcGIS Online account. If the feature service layer is updated here, then the icons would automatically update. </p>
<ul class="list-unstyled li-space-lg">
<li class="media">
<div class="media-body"><strong>Farmer's Market</strong> In this solution, you can view the farmer’s market layer as well as the foodbanks! </div>
</li>
<hr>
<li class="media">
<div class="media-body"><strong>Web Tier</strong> Esri Leaflet </div>
</li>
<li class="media">
<div class="media-body"><strong>Middle Tier</strong> ArcGIS Rest Services Directory </div>
</li>
<li class="media">
<div class="media-body"><strong>Data Tier</strong> Sustainable Cobourg ArcGIS Server </div>
</li>
</ul>
<!-- Shutting down the button until it's been fixed -->
<a class="btn-solid-reg" target="blank" href="alt-solution-leaflet.html">Launch Leaflet in Full Screen</a>
</div> <!-- end of text-container -->
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of basic-2 -->
<!-- end of details 1 -->
<!-- Details 2 Our Writing Section-->
<div id="methods" class="basic-3">
<div class="container">
<div class="row">
<!-- <div class="col-lg-6 col-xl-5"> -->
<div class="text-container">
<h2>Methodology</h2>
<p>Using the published web map from our Sustainable Cobourg’s ArcGIS Online account, we exported the food banks layer as a GeoJSON file and downloaded the file into our GitHub folder via VS Code. We stylized the basemap in Mapbox and added markers for each point along with popup windows for the properties of each point. Below will be a brief highlight of the steps that we took to come to our solution.</p>
<hr>
<h4>Step 0</h4>
<p>Our initial step in creating the solution was to come up with a visually appealing basemap using Mapbox Studio. The team went with a blue monochrome color because it was simple and did not have distracting stylings. It was the easiest template to start working with. </p>
<div class="image-container">
<img class="img-fluid" src="images/monochrome.png" width="800" alt="Monochrome Colors">
<figcaption class="figure-caption">Blue is looking good!</figcaption>
<p></p> <!-- Need a line break here-->
<hr>
<img class="img-fluid" src="images/mapboxstudio.jpg" width="800" alt="Mapbox Studio">
<figcaption class="figure-caption">Decisions had to be made to make sure no icons or cartographic features were sticking out of the ordinary. </figcaption>
<p></p> <!-- Need a line break here-->
<hr>
<img class="img-fluid" src="images/Style.jpg" width="800" alt="Mapbox Style">
<figcaption class="figure-caption">Lastly, we published the style in Mapbox studio and then we were ready to use the basemap!</figcaption>
</div>
<hr>
<h4>Step 1</h4>
<p>From Sustainable Cobourg's ArcGIS Online account, we found the Project Cobourg Web Map. From there we went into the layers to retrieve the Food_Banks (0) Feature Server REST endpoint. This was followed by creating a Query for GeoJSON of the ArcGIS Online Food_Banks (0) FeatureServer. Once we received the GeoJSON return, we saved the output as a GeoJSON file and placed into our repository on GitHub via VS Code.</p>
<div class="image-container">
<img class="img-fluid" src="images/RESTendpoint3.png" alt="RESTendpoint Query">
<p></p> <!-- Need a line break here-->
<img class="img-fluid" src="images/geojson2.jpg" alt="GeoJSON example">
</div>
<hr>
<h4>Step 2</h4>
<p>Once the GeoJSON file was extracted and placed into our repository, we moved onto installing Mapbox to add to our web page. Here are the steps to "Install Mapbox GL JS: Add Mapbox to your app or website".</p>
<ul class="list-unstyled li-space-lg">
<li class="media">
<i class="fas fa-square"></i>
<div class="media-body"><strong>Choose Platform</strong>: iOs, Android, <strong>JS Web</strong> or Unity and Copy the access token.</div>
</li>
<li class="media">
<i class="fas fa-square"></i>
<div class="media-body"><strong>Pick Method:</strong> <strong>HTML</strong> or Module Bundler</div>
</li>
<li class="media">
<i class="fas fa-square"></i>
<div class="media-body"><strong>Install:</strong> Include the GL JS JavaScript and CSS files in the head section of your HTML file.</div>
</li>
<li class="media">
<i class="fas fa-square"></i>
<div class="media-body"><strong>Create a map:</strong> Add the map to your site with access Token, and place map in script section.</div>
</li>
</ul>
<div class="image-container">
<img class="img-fluid" src="images/mapboxInstall.png" alt="RESTendpoint Query">
</div>
<hr>
<h4>Step 3</h4>
<p>Add "mapboxgl.accessToken" that was copied from Step 2 along with a variable for the map window. Here you can style the basemap and paste into link and set the zoom level as well as the center coordinates of your study area. We selected zoom 9 and centered it in Northumberland County. The blue monochromatic basemap was a custom style created by in Mapbox studio. Next, add GeoJSON that was queried from Step 1 into HTML web page under function "map.AddSource".</p>
<div class="image-container">
<img class="img-fluid" src="images/step3_code.PNG" alt="Add GeoJSON to HTML code">
</div>
<hr>
<h4>Step 4</h4>
<p>Next, add Markers & Title Description for each point on the map. We customize the font size, family, offset from the default styling.</p>
<div class="image-container">
<img class="img-fluid" src="images/step4_code.PNG" alt="Add GeoJSON to HTML code">
</div>
<hr>
<h4>Step 5</h4>
<p>Finally, add pop-up windows to points using attributes from properties section.</p>
<div class="image-container">
<img class="img-fluid" src="images/step5_code.png" alt="Add GeoJSON to HTML code">
</div>
<hr>
<h4>Step 6</h4>
<p>Find workflow to automate updates. We found that integrating Mapbox Styling with Leaflet URL input would be our best option moving forward.</p>
<div class="image-container">
<img class="img-fluid" src="images/Step6.PNG" width="700" alt="Leaflet map code">
</div>
<hr>
</div> <!-- end of col -->
<div class="col-lg-6 col-xl-7">
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of basic-3 -->
<!-- end of details 2 -->
<!-- About -->
<div id="about" class="basic-3">
<div class="container">
<div class="row">
<!-- <div class="col-lg-4"> -->
<div class="text-container">
<h2>Meet The Team</h2>
<p>Team Web Charlie has 12 years of combined GIS experience. Trained in the Fleming College GIS Specialist program, each member provides valuable experiences and input to the web solution. To find out more, check out their profiles below!</p>
</div> <!-- end of text-container -->
<!-- </div> end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of basic-5 -->
<!-- end of about -->
<!-- Features -->
<div id="features" class="basic-4">
<div class="container">
<div class="row">
<div class="col-lg-4">
<div class="text-box bg-gray">
<img src="images/Chris.png" class="img-fluid rounded" alt="Responsive image">
<!-- <i class="fas fa-rocket"></i> -->
<p></p>
<h4>Christopher Webb</h4>
<p>GIS Applications Specialist</p>
<p>Graduated from Trent University in 2019 with Honours in Biology and Environmental Resource Science. Turned to GIS because, what else is there to do in an Ontario Lockdown?</p>
<p>Enjoys Pina Coladas and getting caught in the rain.</p>
</div> <!-- end of text-box -->
</div> <!-- end of col -->
<div class="col-lg-4">
<div class="text-box bg-gray">
<img src="images/kezia2.jpg" class="img-fluid rounded" alt="Responsive image">
<!-- <i class="fas fa-rocket"></i> -->
<p></p>
<h4>Kezia Yu</h4>
<p>GIS Cartographic Specialist</p>
<p>Graduated from the University of Toronto in 2018 with an Honours Bachelor of Arts. Majored in Human Geography and minored in GIS and Environmental Geography.</p>
<p>Enjoys long walks on the beach.</p>
</div> <!-- end of text-box -->
</div> <!-- end of col -->
<div class="col-lg-4">
<div class="text-box bg-gray">
<img src="images/jim.jpg" class="img-fluid rounded" alt="Responsive image">
<!-- <i class="fas fa-rocket"></i> -->
<p></p>
<h4>Jim Wei</h4>
<p>GIS Applications Specialist</p>
<p>Avid GIS mapper and scripter that finds interest in programming and automating tasks. Jim has a background in environmental consulting and a Geoscience degree from University of Toronto.</p>
<p>When he is not working, he is curating and refining his dad humor. </p>
</div> <!-- end of text-box -->
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of basic-4 -->
<!-- end of features -->
<!-- Statistics -->
<div class="counter">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="text-container">
<h4>Based on a 2020 COVID-19 Response report by Northumberland County Food 4 All, the first 20 weeks of action (March 13 - July 31, 2020) saw:</h4>
</div>
<!-- Counter -->
<div id="counter">
<div class="cell">
<div class="counter-value number-count" data-count="11200">1</div>
<p class="counter-info">Meals Prepared</p>
</div>
<div class="cell">
<div class="counter-value number-count" data-count="16">1</div>
<p class="counter-info">Foodbanks</p>
</div>
<div class="cell">
<div class="counter-value number-count" data-count="2420">1</div>
<p class="counter-info">Individuals Served</p>
</div>
<div class="cell">
<div class="counter-value number-count" data-count="118">1</div>
<p class="counter-info">Food Deliveries Made</p>
</div>
<div class="cell">
<div class="counter-value number-count" data-count="370090">1</div>
<p class="counter-info">Pounds of Product Distributed</p>
</div>
</div>
<!-- end of counter -->
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of counter -->
<!-- end of statistics -->
<!-- Invitation -->
<div class="basic-6">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div id="extra-space" class="text-container bg-gray">
<h4>Food 4 All provides Food support to many of the local food banks, not-for-profits and school
nutrition programs.
</h4>
<p>To find out about more information about Feed the Change 2020 click the link below.</p>
<a class="btn-solid-lg" href="https://www.northumberland.ca/en/living-here/resources/Documents/Feed-The-Change-2020.pdf" target="_blank">Food 4 All</a>
</div> <!-- end of text-container -->
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of basic-6 -->
<!-- end of invitation -->
<!-- Contact -->
<div id="contact" class="form-1">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2 class="h2-heading">Contact details</h2>
<p class="p-heading">
Don't hesitate to send your questions to us through the contact form.
</p>
</div>
<!-- end of col -->
</div>
<!-- end of row -->
<div class="row">
<div class="col-lg-12">
<!-- Contact Form -->
<div class="form-container">
<img
class="decoration"
src="images/contact-envelope.svg"
alt="alternative"
/>
<form action="https://formspree.io/f/xwkapzwa" method="POST">
<div class="form-group">
<input
type="text"
class="form-control-input"
id="cname"
name="Name"
required
/>
<label class="label-control" for="cname">Name</label>
</div>
<div class="form-group">
<input
type="email"
class="form-control-input"
id="cemail"
name="Email"
required
/>
<label class="label-control" for="cemail">Email</label>
</div>
<div class="form-group">
<textarea
class="form-control-textarea"
id="cmessage"
name="Message"
required
></textarea>
<label class="label-control" for="cmessage"
>Your message</label
>
</div>
<div class="form-group">
<button type="submit" class="form-control-submit-button">
Submit Message
</button>
</div>
</form>
</div>
<!-- end of form-container -->
<!-- end of contact form -->
</div>
<!-- end of col -->
</div>
<!-- end of row -->
</div>
<!-- end of container -->
</div>
<!-- end of form-1 -->
<!-- end of contact -->
<!-- Footer -->
<div class="footer bg-gray">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="social-container">
<span class="fa-stack">
<a href="https://www.facebook.com/SustainableCobourg" target="_blank">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-facebook-f fa-stack-1x"></i>
</a>
</span>
<span class="fa-stack">
<a href="https://twitter.com/greencobourg?lang=en" target="_blank">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-twitter fa-stack-1x"></i>
</a>
</span>
<span class="fa-stack">
<a href="https://www.instagram.com/sustainablecobourg/" target="_blank">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-instagram fa-stack-1x"></i>
</a>
</span>
<span class="fa-stack">
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-youtube fa-stack-1x"></i>
</a>
</span>
</div> <!-- end of social-container -->
</div> <!-- end of col -->
</div> <!-- end of row -->
</div> <!-- end of container -->
</div> <!-- end of footer -->
<!-- end of footer -->
<!-- Copyright -->
<div class="copyright bg-gray">
<div class="container">
<div class="row">
<div class="col-lg-12">
<p class="p-small">Copyright © <a class="no-line" href="https://www.geocommunity.net/">Team Web Charlie - Fleming College</a></p>
<p class="p-small">Powered by <a class="no-line" href="https://inovatik.com">Inovatik</a></p>
<div class="image-container">
<img class="img-fluid" src="images/Fleming.svg" alt="Fleming College Logo" width="200">
</div> <!-- end of image-container -->
</div> <!-- end of col -->
</div> <!-- enf of row -->
</div> <!-- end of container -->
</div> <!-- end of copyright -->
<!-- end of copyright -->
<!-- Scripts -->
<script>
// Modified from: https://docs.mapbox.com/mapbox-gl-js/example/live-geojson/
// Make sure you use your own Access Token
mapboxgl.accessToken = 'pk.eyJ1IjoiaG93ZTIwMjAiLCJhIjoiY2ttbDJub2dsMTZubjJxczJibXU4NnR6diJ9.feWhBPfoAnvhfdvsI2Odxg';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/howe2020/ckmjpi3uc6mg417n4haddm7cg',
zoom: 9,
center: [-78.00, 44.10]
});
map.on('load', function () {
// Add an image to use as a custom marker
map.loadImage(
'https://docs.mapbox.com/mapbox-gl-js/assets/custom_marker.png',
function (error, image) {
if (error) throw error;
map.addImage('custom-marker', image);
// Add a GeoJSON source
map.addSource('points', {
'type': 'geojson',
'data': {
"type" : "FeatureCollection",
"features" : [
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-77.884305, 44.200633
]
},
"properties" : {
"Name" : "7 Hills Community Pantry - 7 Hills Community Pantry",
"Address" : "60 Main St",
"City" : "Trent Hills",
"Province" : "ON",
"Hours" : "Fri 11 am-12:30 pm Dates: All YearMeetings: Board meets monthly",
"Phone" : "705-924-2077",
"Description" : "\u003cb\u003eCOVID19\u003c/b\u003eOperating as a call in and pick up operation. * Those in need in Warkworth and area can call 705-924-2077 and leave a message of what they require. Leave name and phone number to arrange time for order pick up at food bank door. * Please make arrangement for someone else to pick order up if they are feeling ill. Provides food for those in need.",
"Eligbility" : "No restrictions\u003cbr /\u003e\u003cbr /\u003eResidency Requirements: Warkworth and surrounding area",
"DisabilityAccess" : "Fully Accessible"
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-78.077844, 44.166839
]
},
"properties" : {
"Name" : "Alderville First Nation - Alderville Community Food Bank",
"Address" : "8467 County Rd 45",
"City" : "Alnwick/Haldimand",
"Province" : "ON",
"Hours" : "\u003cb\u003eCOVID19\u003c/b\u003e Hours vary daily. Call ahead for food needs.Dates: Year round",
"Phone" : "905-352-2140",
"Description" : "\u003cb\u003eCOVID19\u003c/b\u003e Food orders will be filled and box of food will be left outside for pick up at arranged time.Community Food bank",
"Eligbility" : "First Nation community. * Low income and or OW/ODSP recipients.",
"DisabilityAccess" : "Fully Accessible"
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-77.883614, 44.006443
]
},
"properties" : {
"Name" : "Blessing Cupboard, Colborne",
"Address" : "75 King Street East",
"City" : "Colborne",
"Province" : "ON",
"Hours" : "Sunday 11:30 am – 12:00 noon",
"Phone" : "905-355-2408, 905-207-0059",
"Description" : "<strong>Description</strong>: Prospect Community Church",
"Eligbility" : null,
"DisabilityAccess" : null
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-77.73298, 44.042142
]
},
"properties" : {
"Name" : "Brighton Fare Share Food Bank - Brighton Fare Share Food Bank",
"Address" : "39 A Elizabeth St",
"City" : "Brighton",
"Province" : "ON",
"Hours" : "Food Distribution: first, second, fourth, fifth Mon of the month 9 am-12 noon * third Mon of the month 5:30 pm-8 pmFood Donations accepted: Wed 9 am-12 noonDates: All Year",
"Phone" : null,
"Description" : "\u003cb\u003eCOVID19\u003c/b\u003e Food Bank remains open but clients will have their food brought to their car in the parking lot in a grocery cart.\n\u003cbr\u003e\n\u003cbr\u003eFood assistance to those in need",
"Eligbility" : "Residents of The Municipality of Brighton",
"DisabilityAccess" : "Partially Accessible - Parking - Not Accessible; Entrance - Useable; Washrooms - Not Accessible"
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-77.796748, 44.307359
]
},
"properties" : {
"Name" : "Campbellford Fare Share Food Bank",
"Address" : "28 Doxsee Avenue South (rear of building)",
"City" : "Campbellford",
"Province" : "ON",
"Hours" : "Wednesday, 9:00 am – 11:30 am",
"Phone" : "705-653-1930",
"Description" : "COVID19 Food bank remains open * one person at a time \n \nProvide food assistance to those in need \n* Offers information about other services and encouragement \n* Works together with area churches, the Salvation Army and Northumberland United Way to offer this service \n* Emergency services available.",
"Eligbility" : null,
"DisabilityAccess" : null
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-78.316519, 43.956405
]
},
"properties" : {
"Name" : "Community Health Centres of Northumberland - Food Cupboard",
"Address" : "99 Toronto Road",
"City" : "Port Hope",
"Province" : "ON",
"Hours" : "By appointment only, Thursdays 1:30 pm to 4:00 pm.",
"Phone" : "905-885-2626 ext. 212",
"Description" : "By appointment only. 1 person in the office at a time",
"Eligbility" : null,
"DisabilityAccess" : null
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-78.328418, 44.083107
]
},
"properties" : {
"Name" : "Community Works in Hamilton Township - Food Bank",
"Address" : "Bewdley Community Centre; 7060 Lake St",
"City" : "Hamilton (Township)",
"Province" : "ON",
"Hours" : "Thu 10 am-3 pmDates: All Year",
"Phone" : "905-797-2535 ext 22",
"Description" : "\u003cb\u003eCOVID19\u003c/b\u003e Food bank is open as a drive through only. * Pre-packaged food * Not accepting clothing, toys or household items donations at this time.Provides food only at this time. The clothing, children's toys and small household items operation is suspended until after the Community Centre is re-opened.",
"Eligbility" : "No restrictions",
"DisabilityAccess" : "Fully Accessible"
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-77.958762, 44.311008
]
},
"properties" : {
"Name" : "Hastings & Roseneath Ministerial Food Bank - Hastings & Roseneath Ministerial Food Bank",
"Address" : "Trinity United Church; 3 Albert St W",
"City" : "Trent Hills",
"Province" : "ON",
"Hours" : "First three Tue of the month 1 pm-2:30 pm, 6:30 pm-8 pmFood donations (please check expiry date) to be made outside food bank opening hours, by arrangement.Dates: Jan-mid Dec",
"Phone" : null,
"Description" : "\u003cb\u003eCOVID19\u003c/b\u003e Service by appointment only. Call 705-696-2295.\n\u003cbr\u003e\n\u003cbr\u003eFood bank provides clients with food for approximately 4 days.\n\u003cbr\u003e* Clients are asked to use the food bank only once a month\n\u003cbr\u003e* Occasionally baby food or formula is available",
"Eligbility" : "No restrictions",
"DisabilityAccess" : "Fully Accessible"
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-78.195217, 43.970337
]
},
"properties" : {
"Name" : "Meals on Wheels",
"Address" : "1005 Elgin St W",
"City" : "Cobourg",
"Province" : "ON",
"Hours" : null,
"Phone" : "1-866-514-5774.",
"Description" : "Community Care Northumberland. Currently delivering frozen meals only.",
"Eligbility" : null,
"DisabilityAccess" : null
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-78.183294, 43.965653
]
},
"properties" : {
"Name" : "Northumberland County Food For All",
"Address" : "600 William St",
"City" : "Cobourg",
"Province" : "ON",
"Hours" : "Mon-Fri 9 am-1 pm Dates: All Year",
"Phone" : null,
"Description" : null,
"Eligbility" : null,
"DisabilityAccess" : null
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-78.160374, 43.973006
]
},
"properties" : {
"Name" : "Northumberland Fare Share Food Banks - Northumberland Fare Share Food Banks, Cobourg",
"Address" : "700 D'Arcy St",
"City" : "Cobourg",
"Province" : "ON",
"Hours" : "Wed 10 am-12 noon, 6 pm-8 pm * Fri 10 am-12 noonDates: All Year",
"Phone" : " 905-372-5308",
"Description" : "\u003cb\u003eCOVID19\u003c/b\u003e Delivery Model has changed. * Pick-up outside food bank only.Provide emergency food supplies on Wed and Fri Food donations accepted at the following Cobourg locations:* Metro (Northumberland Mall), 1111 Elgin St W* St Michael's Rectory, 379 Division St* Kawartha Credit Union, 2 King St W* Fisher's Foodland, 990 Division St* Cobourg Fire Department, 111 Elgin St E* David's No Frills, 500 Division St* York Super IDA Pharmacy, 500 Division St",
"Eligbility" : "No restrictions",
"DisabilityAccess" : "Not Accessible"
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-78.29742, 43.953819
]
},
"properties" : {
"Name" : "Northumberland Fare Share Food Banks - Northumberland Fare Share Food Banks, Port Hope",
"Address" : "Port Hope United Church; 34 South St",
"City" : "Port Hope",
"Province" : "ON",
"Hours" : "Wed 10 am-12 noon, 6 pm-8 pmDates: All YearMeetings: Board meetings are held in alternating communities on the second Thu of the month",
"Phone" : "905-885-6674",
"Description" : "\u003cb\u003eCOVID19\u003c/b\u003e Delivery Model has changed.* Pick-up outside food bank only.Provide emergency food supplies Wed to those in need.Food donations accepted at the following Port Hope locations: * Davis Your Independent Grocer, 20 Jocelyn St., Port hope* Port Hope United Church, 34 South St.* Food Basics, 125 Hope St S* Giant Tiger, 145 Peter St, Port Hope",
"Eligbility" : "No restrictions",
"DisabilityAccess" : "Partially Accessible - Parking - Useable; Entrance - Useable; Washrooms - Not Accessible"
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-78.288489, 43.948906
]
},
"properties" : {
"Name" : "Port Hope Salvation Army Community and Family Services",
"Address" : "100 Peter Street, Upper Level",
"City" : "Port Hope",
"Province" : "ON",
"Hours" : "By appointment only Monday & Friday 9am - 1pm",
"Phone" : "905-885-2323",
"Description" : null,
"Eligbility" : null,
"DisabilityAccess" : null
}
},
{
"type" : "Feature",
"geometry" :
{
"type" : "Point",
"coordinates" : [
-78.163317, 43.961224
]
},
"properties" : {