-
Notifications
You must be signed in to change notification settings - Fork 5
/
lecture_all.slides.linked.html
6576 lines (6400 loc) · 325 KB
/
lecture_all.slides.linked.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>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<meta name="author" content="Karl Benedict">
<title></title>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
<link rel="stylesheet" href="slides.css">
<link rel="stylesheet" href="slide_specific.css">
</head>
<body>
<section class="slide level3">
<!---------------------------------------------------------------------------->
<!-- Week 01 ----------------------------------------------------------------->
<!-- Lecture 01 a 01 --------------------------------------------------------->
<!-- Introduction and Outline ------------------------------------------------>
<!---------------------------------------------------------------------------->
</section>
<section id="week-1---module-1---introduction-and-outline" class="titleslide slide level1 module01"><h1>Week 1 - Module 1 - Introduction and Outline</h1></section><section id="overview" class="slide level3 module01">
<h1>Overview</h1>
<ul>
<li>Introductions</li>
<li>Review of the Syllabus</li>
<li>Topics to be Covered</li>
<li>Basics/Definitions</li>
</ul>
</section><section id="introductions" class="slide level3 module01">
<h1>Introductions</h1>
<ul>
<li><p>Who am I?</p></li>
<li><p>Who are you?</p></li>
<li><p>What brought you here?</p></li>
</ul>
</section><section id="syllabus-review-link" class="titleslide slide level2 module01"><h1>Syllabus Review (<a href="https://karlbenedict.github.io/GEOG485-585/syllabus.pdf">link</a>)</h1></section><section id="class-topics" class="slide level3 module01">
<h1>Class Topics</h1>
<ul>
<li><p>Internet Mapping Clients: Basic HTML, Javascript, CSS; Google Maps API; OpenLayers javascript library</p></li>
<li><p>Geospatial Services Oriented Architectures (SOA)</p></li>
<li><p>Open Standards: Open Geospatial Consortium (OGC - <a href="http://www.opengeospatial.org/standards/wms">WMS</a>, <a href="http://www.opengeospatial.org/standards/wfs">WFS</a>, <a href="http://www.opengeospatial.org/standards/wcs">WCS</a>, <a href="http://www.opengeospatial.org/standards/kml">KML</a>); Extensible Markup Language (<a href="http://www.w3.org/XML/">XML</a>)</p></li>
<li><p>Desktop client use of Open Standards</p></li>
<li><p>Data sharing/publication using Open Standards</p></li>
</ul>
</section><section id="basics" class="titleslide slide level2 module01"><h1>Basics</h1></section><section id="outline" class="slide level3 module01">
<h1>Outline</h1>
<ul>
<li><p>What is Internet Mapping?</p></li>
<li><p>Definitions</p></li>
<li><p>Tools</p></li>
</ul>
</section><section id="what-is-internet-mapping" class="slide level3 module01">
<h1>What is Internet Mapping</h1>
<dl>
<dt><em>Extended Desktop Mapping</em></dt>
<dd><p>Use of open standards based remote data and map services in desktop applications</p>
</dd>
<dt><em>Geospatial Data Sharing</em></dt>
<dd><p>Establishing open standards based services to share geospatial data and mapping capabilities over the Internet</p>
</dd>
<dt><em>Web-client Mapping</em></dt>
<dd><p>The delivery of mapping and geospatial data tools through web browsers, again based upon open standards</p>
</dd>
</dl>
</section><section id="definitions" class="slide level3 module01">
<h1>Definitions</h1>
<dl>
<dt>Internet</dt>
<dd><p>The global computer network of computers that typically connect with each other over TCP/IP</p>
</dd>
<dt>World Wide Web</dt>
<dd><p>The subset of applications that are run over the Internet, typically using the HTTP protocol in combination with data (HTML, XML, XHTML), presentation (CSS), and behavior (JavaScript) components</p>
</dd>
<dt>Mapping</dt>
<dd><p>The generation of cartographic products that include map images (pictures of geospatial data) and other elements (e.g. legends, tools, scale information, north-arrow)</p>
</dd>
<dt>Analysis</dt>
<dd><p>The development of models (statistical and otherwise) that enable the exploration of geospatial data and testing of hypotheses using those data</p>
</dd>
<dt>Open Standards</dt>
<dd><p>While the definition varies from one organization to the next, Open Standards are often characterized by the following:</p>
</dd>
</dl>
<ul>
<li>Developed through a public process by a national or international standards group</li>
<li>May be implemented royalty-free</li>
</ul>
<dl>
<dt>Interoperability</dt>
<dd><p>Ability of systems to share data and information with each other</p>
</dd>
<dt>COTS</dt>
<dd><p>Commercial Off-the-Shelf Software. Applications that are “purchased” from vendors, often with license terms that restrict the use the software to the specific platform for which it is licensed. Often comes with implicit or explicit technical support</p>
</dd>
<dt>Open Source</dt>
<dd><p>Software licensed under terms that are consistent with the Open Source definition, which includes access to source code, and freedom to modify and redistribute</p>
</dd>
<dt>Data</dt>
<dd><p>Actual values associated with geographic locations. For example - numeric elevation values associated with locations within a Digital Elevation Model.</p>
</dd>
<dt>Metadata</dt>
<dd><p>Data about a particular data product or service. Metadata provide critical documentation that supports the discovery and use of data products and data and mapping services</p>
</dd>
</dl>
</section><section id="tools" class="titleslide slide level2 module01"><h1>Tools</h1></section><section id="computer-hardware-requirements" class="slide level3 module01">
<h1>Computer Hardware Requirements</h1>
<ul>
<li>At least 2 GB RAM</li>
<li>At least 20 GB of available disk space</li>
<li>Internet Connection (broadband [>728 Kb/sec] recommended)</li>
</ul>
</section><section id="software-requirements" class="slide level3 module01">
<h1>Software Requirements</h1>
<ul>
<li>Supported Operating System</li>
<li>Geographic Information System (GIS)</li>
<li>Text Editor</li>
<li>Secure File Transfer Protocol Client</li>
<li>Secure Shell (SSH) Client</li>
<li>Web Browser (at least one of the following)</li>
<li>A desktop Git/GitHub client for your operating system of choice</li>
</ul>
<!---------------------------------------------------------------------------->
<!-- Week 02 ----------------------------------------------------------------->
<!-- Lecture 02 a 01 --------------------------------------------------------->
<!-- Web-based Mapping Clients------------------------------------------------>
<!-- Introduction to HTML, CSS and Javascript--------------------------------->
<!---------------------------------------------------------------------------->
</section>
<section id="week-2---module-2a---web-based-mapping-clients.-html-css-javascript" class="titleslide slide level1 module02a01"><h1>Week 2 - Module 2a - Web-based Mapping Clients. HTML, CSS & Javascript</h1></section><section id="overview-1" class="slide level3 module02a01">
<h1>Overview</h1>
<ul>
<li>Web Development</li>
<li>Parts of a web page</li>
<li>Web Site Components
<ul>
<li>Structure (X/HTML)</li>
<li>Presentation (CSS)</li>
<li>Behavior (Javascript)</li>
</ul></li>
<li>Simple Web Pages</li>
<li>More Complete Web Page Example</li>
</ul>
</section><section id="web-development" class="slide level3 module02a01">
<h1>Web Development</h1>
<ul>
<li>Requirements
<ul>
<li>Web Server</li>
<li>File location that the web server accesses for requested content</li>
<li>Files must be readable by all users</li>
</ul></li>
<li>General Process
<ul>
<li>Create basic content in HTML or XHTML (structure)</li>
<li>Change appearance of content through the definitions of styles using CSS (presentation)</li>
<li>Add dynamic capabilities to content through Javascript (behavior)</li>
<li>REPEAT over and over and over and over again</li>
</ul></li>
</ul>
</section><section id="parts-of-a-web-page" class="slide level3 module02a01">
<h1>Parts of a Web Page</h1>
<div class="sourceCode"><table class="sourceCode html numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="sourceCode"><pre><code class="sourceCode html"><span class="kw"><html></span>
<span class="co"><!-- The HTML block is the container for all of your page content --></span>
<span class="kw"><head></span>
<span class="co"><!-- The head is where you include pointers to external resources </span>
<span class="co"> (i.e. style sheets and javascript files), blocks of Javascript code</span>
<span class="co"> , styles, etc. --></span>
<span class="kw"><title></span>The page title also goes in here<span class="kw"></title></span>
<span class="kw"></head></span>
<span class="kw"><body></span>
<span class="co"><!-- The body is where you put all of the content for the page </span>
<span class="co"> (i.e. the material that will be displayed in the web browser) --></span>
<span class="kw"><h1></span>Headers<span class="kw"></h1></span>
<span class="kw"><div></span>Generic blocks of content<span class="kw"></div></span>
<span class="kw"><p></span>Paragraphs<span class="kw"></p></span>
<span class="kw"><table></span>Tables<span class="kw"></table></span>
<span class="kw"><img</span> <span class="er">...</span><span class="kw">></span>Images<span class="kw"></img></span>
<span class="kw"><form</span> <span class="er">...</span><span class="kw">></span>Forms<span class="kw"></form></span>
<span class="kw"><ul></span>Unordered Lists<span class="kw"></ul></span>
<span class="kw"><ol></span>Ordered Lists<span class="kw"></ol></span>
<span class="kw"><li></span>List Items<span class="kw"></li></span>
<span class="co"><!-- Javascript can go here as well --></span>
<span class="kw"></body></span>
<span class="kw"></html></span></code></pre></td></tr></table></div>
<p><a href="https://karlbenedict.github.io/GEOG485-585/sample-files/example02_01_01.html">Link to example</a></p>
</section><section id="web-site-components---structure" class="slide level3 module02a01">
<h1>Web Site Components - Structure</h1>
<p>Content is defined in terms of the structural elements available in HTML/XHTML</p>
<ul>
<li>Sample HTML/XHTML Tags
<ul>
<li>Paragraphs (i.e. blocks of text) are contained within <code><p>...</p></code> tags</li>
<li>Headings (i.e. section headings, sub-headings) are contained within numerically defined header tags: <code><h1>...</h1>, <h2>...</h2>, <h3>...</h3></code>, etc.</li>
<li>Tabular data are within <code><table>...</table></code> tags</li>
<li>List are specified within <code><ol>...</ol></code> or <code><ul>...</ul></code> tags, depending upon whether the list is ordered (numbered) or unordered (e.g. bulleted)</li>
<li>User input elements are put within <code><form>...</form></code> tags</li>
<li>Blocks of content (i.e. sections or divisions) are defined within <code><div>...</div></code> tags</li>
</ul></li>
<li>Structure is translated into the Document Object Model (DOM) for later use by CSS and Javascript</li>
</ul>
</section><section id="web-site-components---presentation" class="slide level3 module02a01">
<h1>Web Site Components - Presentation</h1>
<p>Modifications to default rendering of HTML/XHTML elements are made through styles defined in CSS</p>
<ul>
<li>Styles may be
<ul>
<li>defined in an external file that is referenced within the <code><head></code> block (the preferred method when doing “real” web development)</li>
<li>directly defined within the <code><head></code> block of a web page</li>
<li>directly embedded in the elements to which they apply (generally not a “Good Thing”)</li>
</ul></li>
<li>When not embedded within an element, a style definition consists of
<ul>
<li>A selector</li>
<li>The style definition, enclosed in “curly-brackets”, separated by “semi-colons”</li>
<li>For example: <code>h1 {color:red; font-size:18px;}</code></li>
</ul></li>
</ul>
</section><section id="css-selectors" class="slide level3 module02a01">
<h1>CSS Selectors</h1>
<p>Selectors may be based on several criteria</p>
<ul>
<li>Element name: <code>h1</code>, <code>p</code>, <code>table</code>, <code>ul</code>, etc.
<ul>
<li>Element: <code><h1>A top level heading</h1></code></li>
<li>Selector: <code>h1 {color:red; font-size:18px}</code></li>
</ul></li>
<li>Element ID: a unique name assigned to HTML/XHTML elements within the structure of the document
<ul>
<li>Element: <code><p id=”para01”>Some text goes here</p></code></li>
<li>Selector: <code>#para01 {color:blue; font-size:12px}</code></li>
</ul></li>
<li>Class ID: a name assigned to multiple elements which may be modified through reference to their class
<ul>
<li>Element: <code><p class=”instructions”>Here are some instructions</p></code></li>
<li>Another Element: <code><p class=”instructions”>Here are some more instructions</p></code></li>
<li>Selector: <code>.instructions {color:red; font-size:12px; text-decoration:blink}</code></li>
</ul></li>
<li>Selectors may be combined in a variety of ways</li>
</ul>
</section><section id="web-site-components---behavior" class="slide level3 module02a01">
<h1>Web Site Components - Behavior</h1>
<p>The most interoperable language for adding dynamic behavior to web sites is <em>Javascript</em> - supported by most browsers on most operating systems</p>
<ul>
<li>A full-fledged programming language
<ul>
<li>A non-trivial undertaking to become proficient in</li>
<li>Experience in other programming languages can contribute to learning Javascript</li>
</ul></li>
<li>Defines actions that may be taken on/by DOM elements</li>
<li>Allows for modification of existing DOM elements, creation of new DOM elements after the page has finished loading from the server, retrieval of new content after page loads
<ul>
<li>An interactive web page that may behave like a local desktop application</li>
</ul></li>
</ul>
</section><section id="reference-links" class="slide level3 module02a01">
<h1>Reference Links</h1>
<ul>
<li>w3schools.com
<ul>
<li><a href="http://www.w3schools.com/tags/default.asp">HTML 4.0 / XHTML 1.0 Tag Reference</a></li>
<li><a href="http://www.w3schools.com/css/default.asp">Cascading Style Sheet (CSS) selectors and elements</a></li>
<li><a href="http://www.w3schools.com/js/default.asp">Javascript reference</a></li>
</ul></li>
<li>World Wide Web Consortium (W3C)
<ul>
<li><a href="http://www.w3.org/standards/webdesign/htmlcss">HTML and CSS Background</a></li>
<li><a href="http://www.w3.org/2002/03/tutorials.html#webdesign_htmlcss">HTML and CSS Tutorial Links Page</a></li>
<li><a href="http://validator.w3.org/">Validators Page</a></li>
</ul></li>
<li>Webmonkey.com
<ul>
<li><a href="https://www.wired.com/2010/02/html_cheatsheet/">HTML Cheat Sheet</a></li>
<li><a href="https://www.wired.com/2010/02/css-guide/">CSS Guide</a></li>
</ul></li>
</ul>
</section><section id="simple-web-page" class="slide level3 module02a01">
<h1>Simple Web Page</h1>
<div class="sourceCode"><table class="sourceCode html numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="sourceCode"><pre><code class="sourceCode html"><span class="kw"><html></span>
<span class="kw"><head></span>
<span class="kw"><meta</span><span class="ot"> http-equiv=</span><span class="st">"Content-Type"</span><span class="ot"> content=</span><span class="st">"text/html;charset=utf-8"</span> <span class="kw">/></span>
<span class="kw"><title></span>This is a simple web page<span class="kw"></title></span>
<span class="kw"></head></span>
<span class="kw"><body></span>
<span class="kw"><h1></span>They don't get any simpler than this!<span class="kw"></h1></span>
<span class="kw"><p></span>OK, not much simpler than this.<span class="kw"></p></span>
<span class="kw"><p></span>Hello World?<span class="kw"></p></span>
<span class="kw"></body></span>
<span class="kw"></html></span></code></pre></td></tr></table></div>
<p><a href="https://karlbenedict.github.io/GEOG485-585/sample-files/example02_01_02.html">link to example</a></p>
</section><section id="simple-web-page-with-css" class="slide level3">
<h1>Simple Web Page with CSS</h1>
<div class="sourceCode"><table class="sourceCode html numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="sourceCode"><pre><code class="sourceCode html"><span class="kw"><html></span>
<span class="kw"><head></span>
<span class="kw"><meta</span><span class="ot"> http-equiv=</span><span class="st">"Content-Type"</span><span class="ot"> content=</span><span class="st">"text/html;charset=utf-8"</span> <span class="kw">/></span>
<span class="kw"><title></span>This is a simple web page - with styling<span class="kw"></title></span>
<span class="kw"><style</span><span class="ot"> type=</span><span class="st">"text/css"</span><span class="kw">></span>
h1 <span class="kw">{color:</span><span class="dt">blue</span><span class="kw">;</span> <span class="kw">font-size:</span><span class="dt">large</span><span class="kw">}</span>
p<span class="fl">.para</span> <span class="kw">{color:</span><span class="dt">#777777</span><span class="kw">;</span> <span class="kw">font-size:</span><span class="dt">small</span><span class="kw">}</span>
<span class="fl">#annoying</span> <span class="kw">{color:</span><span class="dt">red</span><span class="kw">;</span> <span class="kw">text-decoration:</span><span class="dt">line-through</span><span class="kw">}</span>
<span class="kw"></style></span>
<span class="kw"></head></span>
<span class="kw"><body></span>
<span class="kw"><h1></span>They don't get any simpler than this!<span class="kw"></h1></span>
<span class="kw"><p</span><span class="ot"> class=</span><span class="st">"para"</span><span class="kw">></span>OK, not much simpler than this.<span class="kw"></p></span>
<span class="kw"><p</span><span class="ot"> id=</span><span class="st">"annoying"</span><span class="ot"> class=</span><span class="st">"para"</span><span class="kw">></span>Hello World?<span class="kw"></p></span>
<span class="kw"></body></span>
<span class="kw"></html></span></code></pre></td></tr></table></div>
<p><a href="https://karlbenedict.github.io/GEOG485-585/sample-files/example02_01_03.html">link to example</a></p>
</section><section id="simple-web-page-with-javascript" class="slide level3">
<h1>Simple Web Page with Javascript</h1>
<div class="sourceCode"><table class="sourceCode html numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="sourceCode"><pre><code class="sourceCode html"><span class="kw"><html></span>
<span class="kw"><head></span>
<span class="kw"><meta</span><span class="ot"> http-equiv=</span><span class="st">"Content-Type"</span><span class="ot"> content=</span><span class="st">"text/html;charset=utf-8"</span> <span class="kw">/></span>
<span class="kw"><title></span>This is a simple web page with Javascript<span class="kw"></title></span>
<span class="kw"><script</span><span class="ot"> type=</span><span class="st">"text/javascript"</span><span class="kw">></span>
<span class="kw">function</span> <span class="at">genericAlert</span>() <span class="op">{</span>
<span class="at">alert</span>(<span class="st">"You just did something ..."</span>)
<span class="va">document</span>.<span class="at">getElementById</span>(<span class="st">"clickMe"</span>).<span class="va">style</span>.<span class="at">color</span> <span class="op">=</span> <span class="st">"red"</span>
<span class="op">}</span>
<span class="op"><</span><span class="ss">/script></span>
<span class="ss"> </head</span><span class="op">></span>
<span class="op"><</span>body<span class="op">></span>
<span class="op"><</span>h1<span class="op">></span>They don<span class="st">'t get any simpler than this!</h1></span>
<span class="op"><</span>p<span class="op">></span>OK<span class="op">,</span> not much simpler than <span class="kw">this</span>.<span class="op"><</span><span class="ss">/p></span>
<span class="ss"> <p>Hello World</span><span class="sc">?</span><span class="ss"></p</span><span class="op">></span>
<span class="op"><</span>p id<span class="op">=</span><span class="st">"clickMe"</span> onclick<span class="op">=</span><span class="st">"genericAlert();"</span><span class="op">></span>What happens when you click me<span class="op">?<</span><span class="ss">/p></span>
<span class="ss"> </body</span><span class="op">></span>
<span class="op"><</span><span class="ss">/html></span></code></pre></td></tr></table></div>
<p><a href="https://karlbenedict.github.io/GEOG485-585/sample-files/example02_01_04.html">link to example</a></p>
</section><section id="more-complete-web-page-example" class="slide level3">
<h1>More Complete Web Page Example</h1>
<figure>
<img src="images/www_nawrs_net.png" alt="NAWRS Mapper. HTML: 39 Lines; CSS: 136 Lines; core.js: 515 Lines + Google Maps API and JQuery Framework" /><figcaption><a href="http://www.nawrs.net">NAWRS Mapper</a>. <em>HTML</em>: 39 Lines; <em>CSS</em>: 136 Lines; <em>core.js</em>: 515 Lines + Google Maps API and JQuery Framework</figcaption>
</figure>
<!---------------------------------------------------------------------------->
<!-- Week 03 ----------------------------------------------------------------->
<!-- Lecture 02 a 02 a ------------------------------------------------------->
<!-- Web-based Mapping Clients------------------------------------------------>
<!-- Google Maps API---------------------------------------------------------->
<!---------------------------------------------------------------------------->
</section>
<section id="week-3--module-2a---web-based-mapping-clients.-google-maps-api" class="titleslide slide level1 module02a02a"><h1>Week 3- Module 2a - Web-based Mapping Clients. Google Maps API</h1></section><section id="outline-1" class="slide level3 module02a02a">
<h1>Outline</h1>
<ul>
<li><p>What is an API</p></li>
<li>The Google Maps API
<ul>
<li>Version</li>
<li>Reference Information</li>
<li>Key Components</li>
<li>Examples</li>
</ul></li>
</ul>
</section><section id="what-is-an-api" class="slide level3 module02a02a">
<h1>What is an API</h1>
<ul>
<li>API Stands for Application Programming Interface</li>
</ul>
<blockquote>
<p>An Application Programming Interface (API) is a particular set of rules and specifications that a software program can follow to access and make use of the services and resources provided by another particular software program that implements that API. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers. -- From Wikipedia: <a href="http://en.wikipedia.org/wiki/Api" class="uri">http://en.wikipedia.org/wiki/Api</a></p>
</blockquote>
<ul>
<li>The Google Maps API provides an interface for interacting with Google’s mapping services from external web applications</li>
</ul>
</section><section id="google-maps-api-version" class="slide level3 module02a02a">
<h1>Google Maps API Version</h1>
<ul>
<li>The version of the Google Maps API used in this class is v3 of the Javascript API
<ul>
<li>Freely usable for free applications</li>
<li>Subject to Google’s Terms of Service</li>
<li>Google <a href="https://developers.google.com/maps/faq?hl=en#using-google-maps-apis">API key is now required</a></li>
</ul></li>
<li>Key capabilities in v3
<ul>
<li>Interactive maps based on Google’s mapping engine (contrast w. static maps API)</li>
<li>Optimized for desktop and mobile platforms and applications</li>
</ul></li>
</ul>
</section><section id="reference-information" class="slide level3 module02a02a">
<h1>Reference Information</h1>
<dl>
<dt>Google Maps API Family</dt>
<dd><a href="https://developers.google.com/maps/?csw=1">http://code.google.com/apis/maps/</a>
</dd>
<dt>Javascript API Home Page</dt>
<dd><a href="https://developers.google.com/maps/documentation/javascript/?csw=1" class="uri">https://developers.google.com/maps/documentation/javascript/?csw=1</a>
</dd>
<dt>Javascript API v3 Tutorial Page</dt>
<dd><a href="https://developers.google.com/maps/documentation/javascript/tutorial?csw=1">http://code.google.com/apis/maps/documentation/javascript/tutorial.html</a>
</dd>
</dl>
</section><section id="key-components" class="slide level3 module02a02a">
<h1>Key Components</h1>
<ul>
<li>Map <a href="https://developers.google.com/maps/documentation/javascript/reference?csw=1#MapOptions">object options</a></li>
</ul>
<dl>
<dt>Types (required)</dt>
<dd>ROADMAP
</dd>
<dd>SATELLITE
</dd>
<dd>HYBRID
</dd>
<dd>TERRAIN
</dd>
<dt>Latitude and Longitude (required)</dt>
<dd>specification of where the map should initially be centered
</dd>
<dt>Zoom Level (required)</dt>
<dd>0=global, higher values increasingly local. Limited by map type
</dd>
</dl>
</section><section id="controls" class="slide level3 module02a02a">
<h1>Controls</h1>
<ul>
<li>Available Controls (enabled through map options) <a href="https://developers.google.com/maps/documentation/javascript/controls?csw=1#DefaultUI">default controls</a>
<ul>
<li>Zoom Control</li>
<li>Scale Control</li>
<li>MapType Control</li>
<li>Street View Control</li>
<li>Rotate (for maps that contain 45-degree imagery)</li>
<li>Fullscreen Control</li>
</ul></li>
<li>Different control styles may be defined</li>
<li>Controls may be positioned <a href="https://developers.google.com/maps/documentation/javascript/controls?csw=1#ControlPositioning">positioning options</a></li>
<li>Custom controls may be defined and attached to fixed location in the map</li>
</ul>
</section><section id="overlays" class="slide level3 module02a02a">
<h1>Overlays</h1>
<p>Overlay Types <a href="https://developers.google.com/maps/documentation/javascript/overlays?csw=1">documentation</a></p>
<dl>
<dt>Marker</dt>
<dd>points depicted by specified or defined icons at locations within the map (<a href="https://developers.google.com/maps/documentation/javascript/markers">reference</a>)
</dd>
<dt>Polyline</dt>
<dd>linear features defined by multiple points with a defined style for the line (<a href="https://developers.google.com/maps/documentation/javascript/shapes">reference</a>)
</dd>
<dt>Polygon</dt>
<dd>closed features defined by multiple points. Supports multi-polygons, and donuts. Line and fill styles may be specified. (<a href="https://developers.google.com/maps/documentation/javascript/shapes">reference</a>)
</dd>
<dt>(Ground) Overlay Maps</dt>
<dd>Image-based map layers that replace or overlay Google layers - registered to the map coordinates (<a href="https://developers.google.com/maps/documentation/javascript/groundoverlays">reference</a>)
</dd>
<dt>Info Windows</dt>
<dd>floating content windows for displaying content defined as HTML, a DOM element, or text string (<a href="https://developers.google.com/maps/documentation/javascript/infowindows">reference</a>)
</dd>
<dt>Layers</dt>
<dd>Grouped display content assigned to a specific layer type: Data (including GeoJSON), KmlLayer (& GeoRSS), Heatmap, FusionTablesLayer, TrafficLayer, TransitLayer, BicyclingLayer (<a href="https://developers.google.com/maps/documentation/javascript/layers">reference</a>)
</dd>
<dt>Custom Overlays</dt>
<dd>definition of programmatically controlled layers (<a href="https://developers.google.com/maps/documentation/javascript/customoverlays">reference</a>)
</dd>
</dl>
</section><section id="services" class="slide level3 module02a02a">
<h1>Services</h1>
<ul>
<li>Geocoding Service
<ul>
<li>Forward and reverse geocoding:
<ul>
<li>address to LatLon</li>
<li>LatLon to Nearest Address</li>
</ul></li>
<li>May be biased to current viewport, region</li>
</ul></li>
<li>Directions
<ul>
<li>Based upon an origin, destination, and a variety of additional options</li>
<li>Available directions and rendered route</li>
</ul></li>
<li>Distance Matrix
<ul>
<li>Travel distance and duration given a specific mode of travel</li>
</ul></li>
<li>Elevation
<ul>
<li>Delivery of elevation data for locations or paths</li>
</ul></li>
<li>Streetview
<ul>
<li>Integration of Google Streetview within a DOM element</li>
</ul></li>
<li>Maximum Zoom
<ul>
<li>Provides information about the maximum available zoom level</li>
</ul></li>
</ul>
</section><section id="events" class="slide level3 module02a02a">
<h1>Events</h1>
<ul>
<li>Events provide the ability to attach custom behaviors to events in the interface. For example:
<ul>
<li>Changing items in the interface as the user zooms in on a map</li>
<li>Displaying additional information outside the map when the user clicks a location in the map</li>
<li>Synchronizing the behavior of multiple maps as the user interacts with one map</li>
</ul></li>
<li>Requires higher-level Javascript than we will cover in this course</li>
</ul>
</section><section id="examples" class="slide level3 module02a02a">
<h1>Examples</h1>
</section><section id="simple---roadmap" class="slide level3 module02a02a">
<h1>Simple - Roadmap</h1>
<p><img src="images/gmaps01.png" alt="gmaps01.html preview" /> </p>
</section><section id="simple---roadmap-code" class="slide level3 module02a02a">
<h1>Simple - Roadmap Code</h1>
<div class="codeTable">
<p>gmaps01.html</p>
<div class="sourceCode"><table class="sourceCode html numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="sourceCode"><pre><code class="sourceCode html"><span class="dt"><!DOCTYPE </span>html<span class="dt">></span>
<span class="kw"><html></span>
<span class="kw"><head></span>
<span class="kw"><link</span><span class="ot"> rel=</span><span class="st">"stylesheet"</span><span class="ot"> type=</span><span class="st">"text/css"</span><span class="ot"> href=</span><span class="st">"css/mapPage.css"</span><span class="kw">></span>
<span class="kw"></head></span>
<span class="kw"><body></span>
<span class="kw"><h1></span>Sample Map<span class="kw"></h1></span>
<span class="kw"><div</span><span class="ot"> id=</span><span class="st">"map_canvas"</span><span class="kw">></div></span>
<span class="co"><!-- Let's put our JavaScript down here </span><span class="er">-------------------------------------------</span><span class="co">--></span>
<span class="co"><!-- Load the external JavaScript file with the map definition code --></span>
<span class="kw"><script</span><span class="ot"> src=</span><span class="st">"js/mapPage_01.js"</span><span class="kw">></script></span>
<span class="co"><!-- Load the API in asynchronous mode and execute the initialize </span>
<span class="co"> function when done --></span>
<span class="kw"><script</span><span class="ot"> async defer</span>
<span class="ot"> src=</span><span class="st">"https://maps.googleapis.com/maps/api/js?callback=initialize</span><span class="er">&</span><span class="st">key=</span><span class="er"><</span><span class="st">mykey>"</span><span class="kw">></span>
<span class="kw"></script></span>
<span class="kw"></body></span>
<span class="kw"></html></span></code></pre></td></tr></table></div>
<p>mapPage.css</p>
<div class="sourceCode"><table class="sourceCode css numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="sourceCode"><pre><code class="sourceCode css"><span class="co">/* You must set the height of either the 'html' or 'body' elements for some </span>
<span class="co"> browsers to properly render the map with a hight taller than 0px */</span>
html <span class="kw">{</span>
<span class="kw">height:</span> <span class="dt">100%</span> <span class="kw">}</span>
body <span class="kw">{</span>
<span class="kw">height:</span> <span class="dt">100%</span><span class="kw">;</span>
<span class="kw">margin:</span> <span class="dt">0px</span><span class="kw">;</span>
<span class="kw">padding:</span> <span class="dt">0px</span><span class="kw">;</span>
<span class="kw">background-color:</span> <span class="dt">black</span><span class="kw">;</span>
<span class="kw">color:</span> <span class="dt">#CCCCCC</span><span class="kw">;</span>
<span class="kw">text-align:</span> <span class="dt">center</span><span class="kw">}</span>
<span class="fl">#map_canvas</span> <span class="kw">{</span>
<span class="kw">width:</span><span class="dt">90%</span><span class="kw">;</span>
<span class="kw">height:</span><span class="dt">80%</span><span class="kw">;</span>
<span class="kw">margin-left:</span><span class="dt">auto</span><span class="kw">;</span>
<span class="kw">margin-right:</span> <span class="dt">auto</span> <span class="kw">}</span>
<span class="fl">.infoBox</span> <span class="kw">{</span>
<span class="kw">color:</span><span class="dt">black</span> <span class="kw">}</span></code></pre></td></tr></table></div>
<p>mapPage_01.js</p>
<div class="sourceCode"><table class="sourceCode js numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="sourceCode"><pre><code class="sourceCode">function initialize() {
var classroom = new google.maps.LatLng(35.084280,-106.624073)
var mapOptions = {
zoom: 8,
center: classroom,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(
document.getElementById("map_canvas"),
mapOptions);
}
</code></pre></td></tr></table></div>
</div>
</section><section id="simple---satellite" class="slide level3 module02a02a">
<h1>Simple - Satellite</h1>
<p><img src="images/gmaps02.png" alt="gmaps02.html preview" /> </p>
</section><section id="simple---satellite-code" class="slide level3 module02a02a">
<h1>Simple - Satellite Code</h1>
<div class="codeTable">
<p>gmaps02.html</p>
<div class="sourceCode"><table class="sourceCode html numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="sourceCode"><pre><code class="sourceCode html"><span class="dt"><!DOCTYPE </span>html<span class="dt">></span>
<span class="kw"><html></span>
<span class="kw"><head></span>
<span class="kw"><link</span><span class="ot"> rel=</span><span class="st">"stylesheet"</span><span class="ot"> type=</span><span class="st">"text/css"</span><span class="ot"> href=</span><span class="st">"css/mapPage.css"</span><span class="kw">></span>
<span class="kw"></head></span>
<span class="kw"><body></span>
<span class="kw"><h1></span>Sample Map<span class="kw"></h1></span>
<span class="kw"><div</span><span class="ot"> id=</span><span class="st">"map_canvas"</span><span class="kw">></div></span>
<span class="co"><!-- Let's put our JavaScript down here </span><span class="er">-------------------------------------------</span><span class="co">--></span>
<span class="co"><!-- Load the external JavaScript file with the map definition code --></span>
<span class="kw"><script</span><span class="ot"> src=</span><span class="st">"js/mapPage_02.js"</span><span class="kw">></script></span>
<span class="co"><!-- Load the API in asynchronous mode and execute the initialize </span>
<span class="co"> function when done --></span>
<span class="kw"><script</span><span class="ot"> async defer</span>
<span class="ot"> src=</span><span class="st">"https://maps.googleapis.com/maps/api/js?callback=initialize</span><span class="er">&</span><span class="st">key=</span><span class="er"><</span><span class="st">mykey>"</span><span class="kw">></span>
<span class="kw"></script></span>
<span class="kw"></body></span>
<span class="kw"></html></span></code></pre></td></tr></table></div>
<p>mapPage_02.js</p>
<div class="sourceCode"><table class="sourceCode js numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="sourceCode"><pre><code class="sourceCode">function initialize() {
var classroom = new google.maps.LatLng(35.084280,-106.624073)
var mapOptions = {
zoom: 8,
center: classroom,
mapTypeId: google.maps.MapTypeId.SATELLITE
};
var map = new google.maps.Map(
document.getElementById("map_canvas"),
mapOptions);
}
</code></pre></td></tr></table></div>
</div>
</section><section id="simple---hybrid" class="slide level3 module02a02a">
<h1>Simple - Hybrid</h1>
<p><img src="images/gmaps03.png" alt="gmaps03.html preview" /> </p>
</section><section id="simple---hybrid-code" class="slide level3 module02a02a">
<h1>Simple - Hybrid Code</h1>
<div class="codeTable">
<p>gmaps03.html</p>
<div class="sourceCode"><table class="sourceCode html numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="sourceCode"><pre><code class="sourceCode html"><span class="dt"><!DOCTYPE </span>html<span class="dt">></span>
<span class="kw"><html></span>
<span class="kw"><head></span>
<span class="kw"><link</span><span class="ot"> rel=</span><span class="st">"stylesheet"</span><span class="ot"> type=</span><span class="st">"text/css"</span><span class="ot"> href=</span><span class="st">"css/mapPage.css"</span><span class="kw">></span>
<span class="kw"></head></span>
<span class="kw"><body></span>
<span class="kw"><h1></span>Sample Map<span class="kw"></h1></span>
<span class="kw"><div</span><span class="ot"> id=</span><span class="st">"map_canvas"</span><span class="kw">></div></span>
<span class="co"><!-- Let's put our JavaScript down here </span><span class="er">-------------------------------------------</span><span class="co">--></span>
<span class="co"><!-- Load the external JavaScript file with the map definition code --></span>
<span class="kw"><script</span><span class="ot"> src=</span><span class="st">"js/mapPage_03.js"</span><span class="kw">></script></span>
<span class="co"><!-- Load the API in asynchronous mode and execute the initialize </span>
<span class="co"> function when done --></span>
<span class="kw"><script</span><span class="ot"> async defer</span>
<span class="ot"> src=</span><span class="st">"https://maps.googleapis.com/maps/api/js?callback=initialize</span><span class="er">&</span><span class="st">key=</span><span class="er"><</span><span class="st">mykey>"</span><span class="kw">></span>
<span class="kw"></script></span>
<span class="kw"></body></span>
<span class="kw"></html></span></code></pre></td></tr></table></div>
<p>mapPage_03.js</p>
<div class="sourceCode"><table class="sourceCode js numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="sourceCode"><pre><code class="sourceCode">function initialize() {
var classroom = new google.maps.LatLng(35.084280,-106.624073)
var mapOptions = {
zoom: 8,
center: classroom,
mapTypeId: google.maps.MapTypeId.HYBRID
};
var map = new google.maps.Map(
document.getElementById("map_canvas"),
mapOptions);
}
</code></pre></td></tr></table></div>
</div>
</section><section id="simple---terrain" class="slide level3 module02a02a">
<h1>Simple - Terrain</h1>
<p><img src="images/gmaps04.png" alt="gmaps04.html preview" /> </p>
</section><section id="simple---terrain-code" class="slide level3 module02a02a">
<h1>Simple - Terrain Code</h1>
<div class="codeTable">
<p>gmaps04.html</p>
<div class="sourceCode"><table class="sourceCode html numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="sourceCode"><pre><code class="sourceCode html"><span class="dt"><!DOCTYPE </span>html<span class="dt">></span>
<span class="kw"><html></span>
<span class="kw"><head></span>
<span class="kw"><link</span><span class="ot"> rel=</span><span class="st">"stylesheet"</span><span class="ot"> type=</span><span class="st">"text/css"</span><span class="ot"> href=</span><span class="st">"css/mapPage.css"</span><span class="kw">></span>
<span class="kw"></head></span>
<span class="kw"><body></span>
<span class="kw"><h1></span>Sample Map<span class="kw"></h1></span>
<span class="kw"><div</span><span class="ot"> id=</span><span class="st">"map_canvas"</span><span class="kw">></div></span>
<span class="co"><!-- Let's put our JavaScript down here </span><span class="er">-------------------------------------------</span><span class="co">--></span>
<span class="co"><!-- Load the external JavaScript file with the map definition code --></span>
<span class="kw"><script</span><span class="ot"> src=</span><span class="st">"js/mapPage_04.js"</span><span class="kw">></script></span>
<span class="co"><!-- Load the API in asynchronous mode and execute the initialize </span>
<span class="co"> function when done --></span>
<span class="kw"><script</span><span class="ot"> async defer</span>
<span class="ot"> src=</span><span class="st">"https://maps.googleapis.com/maps/api/js?callback=initialize</span><span class="er">&</span><span class="st">key=</span><span class="er"><</span><span class="st">mykey>"</span><span class="kw">></span>
<span class="kw"></script></span>
<span class="kw"></body></span>
<span class="kw"></html></span></code></pre></td></tr></table></div>
<p>mapPage_04.js</p>
<div class="sourceCode"><table class="sourceCode js numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="sourceCode"><pre><code class="sourceCode">function initialize() {
var classroom = new google.maps.LatLng(35.084280,-106.624073)
var mapOptions = {
zoom: 8,
center: classroom,
mapTypeId: google.maps.MapTypeId.TERRAIN
};
var map = new google.maps.Map(
document.getElementById("map_canvas"),
mapOptions);
}
</code></pre></td></tr></table></div>
</div>
</section><section id="simple---hybrid---zoomed" class="slide level3 module02a02a">
<h1>Simple - Hybrid - Zoomed</h1>
<p><img src="images/gmaps05.png" alt="gmaps05.html preview" /> </p>
</section><section id="simple---hybrid---zoomed-code" class="slide level3 module02a02a">
<h1>Simple - Hybrid - Zoomed Code</h1>
<div class="codeTable">
<p>gmaps05.html</p>
<div class="sourceCode"><table class="sourceCode html numberLines"><tr class="sourceCode"><td class="lineNumbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="sourceCode"><pre><code class="sourceCode html"><span class="dt"><!DOCTYPE </span>html<span class="dt">></span>
<span class="kw"><html></span>
<span class="kw"><head></span>
<span class="kw"><link</span><span class="ot"> rel=</span><span class="st">"stylesheet"</span><span class="ot"> type=</span><span class="st">"text/css"</span><span class="ot"> href=</span><span class="st">"css/mapPage.css"</span><span class="kw">></span>
<span class="kw"></head></span>
<span class="kw"><body></span>
<span class="kw"><h1></span>Sample Map<span class="kw"></h1></span>
<span class="kw"><div</span><span class="ot"> id=</span><span class="st">"map_canvas"</span><span class="kw">></div></span>
<span class="co"><!-- Let's put our JavaScript down here </span><span class="er">-------------------------------------------</span><span class="co">--></span>
<span class="co"><!-- Load the external JavaScript file with the map definition code --></span>