-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
487 lines (273 loc) · 16.8 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
<!DOCTYPE HTML>
<html lang="en-US" ><meta http-equiv="content-type" content="text/html;charset=utf-8" />
<head>
<meta charset="UTF-8">
<title>Introduction | Practical OpenLayers 3 & Leaflet</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="A hands on introduction to using OpenLayer 3 (OL3) and Leaflet to display spatial data on the web. The workshop will introduce the two libraries, the underpinning concepts and strengths of each, and take delegates through creating a series of examples.">
<meta name="generator" content="GitBook 1.0.0">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="ol3/README.html" />
</head>
<body>
<link rel="stylesheet" href="gitbook/style.css">
<div class="book" data-level="0" data-basepath="." data-revision="1437644885711">
<div class="book-summary">
<div class="book-search">
<input type="text" placeholder="Type to search" class="form-control" />
</div>
<ul class="summary">
<li class="chapter active" data-level="0" data-path="index-2.html">
<a href="index-2.html">
<i class="fa fa-check"></i>
Introduction
</a>
</li>
<li class="chapter " data-level="1" data-path="ol3/README.html">
<a href="ol3/README.html">
<i class="fa fa-check"></i>
<b>1.</b>
OpenLayers 3
</a>
<ul class="articles">
<li class="chapter " data-level="1.1" data-path="ol3/00-OSM-MAP.html">
<a href="ol3/00-OSM-MAP.html">
<i class="fa fa-check"></i>
<b>1.1.</b>
Basic map with OSM tiles
</a>
</li>
<li class="chapter " data-level="1.2" data-path="ol3/01-OSGB-MAP.html">
<a href="ol3/01-OSGB-MAP.html">
<i class="fa fa-check"></i>
<b>1.2.</b>
OS-GB Map with Ordnance Survey tiles
</a>
</li>
<li class="chapter " data-level="1.3" data-path="ol3/02-GEOJSON.html">
<a href="ol3/02-GEOJSON.html">
<i class="fa fa-check"></i>
<b>1.3.</b>
GeoJSON layer with markers
</a>
</li>
<li class="chapter " data-level="1.4" data-path="ol3/03-GEOJSON-INFO.html">
<a href="ol3/03-GEOJSON-INFO.html">
<i class="fa fa-check"></i>
<b>1.4.</b>
Info for GeoJSON layer
</a>
</li>
<li class="chapter " data-level="1.5" data-path="ol3/04-WMS-LAYER.html">
<a href="ol3/04-WMS-LAYER.html">
<i class="fa fa-check"></i>
<b>1.5.</b>
WMS layer
</a>
</li>
<li class="chapter " data-level="1.6" data-path="ol3/05-WMS-INFO.html">
<a href="ol3/05-WMS-INFO.html">
<i class="fa fa-check"></i>
<b>1.6.</b>
Info for WMS layer
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="2" data-path="leaflet/README.html">
<a href="leaflet/README.html">
<i class="fa fa-check"></i>
<b>2.</b>
Leaflet
</a>
<ul class="articles">
<li class="chapter " data-level="2.1" data-path="leaflet/00-OSM-MAP.html">
<a href="leaflet/00-OSM-MAP.html">
<i class="fa fa-check"></i>
<b>2.1.</b>
Basic map with OSM tiles
</a>
</li>
<li class="chapter " data-level="2.2" data-path="leaflet/01-OSGB-MAP.html">
<a href="leaflet/01-OSGB-MAP.html">
<i class="fa fa-check"></i>
<b>2.2.</b>
OS-GB Map with Ordnance Survey tiles
</a>
</li>
<li class="chapter " data-level="2.3" data-path="leaflet/02-GEOJSON.html">
<a href="leaflet/02-GEOJSON.html">
<i class="fa fa-check"></i>
<b>2.3.</b>
GeoJSON layer with markers
</a>
</li>
<li class="chapter " data-level="2.4" data-path="leaflet/03-GEOJSON-INFO.html">
<a href="leaflet/03-GEOJSON-INFO.html">
<i class="fa fa-check"></i>
<b>2.4.</b>
Info for GeoJSON layer
</a>
</li>
<li class="chapter " data-level="2.5" data-path="leaflet/04-WMS-LAYER.html">
<a href="leaflet/04-WMS-LAYER.html">
<i class="fa fa-check"></i>
<b>2.5.</b>
WMS layer
</a>
</li>
<li class="chapter " data-level="2.6" data-path="leaflet/05-WMS-INFO.html">
<a href="leaflet/05-WMS-INFO.html">
<i class="fa fa-check"></i>
<b>2.6.</b>
Info for WMS layer
</a>
</li>
</ul>
</li>
<li class="divider"></li>
<li>
<a href="http://www.gitbook.io/" target="blank" class="gitbook-link">Published using GitBook</a>
</li>
</ul>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header">
<!-- Actions Left -->
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
<a href="#" class="btn pull-left toggle-search" aria-label="Toggle search"><i class="fa fa-search"></i></a>
<div id="font-settings-wrapper" class="dropdown pull-left">
<a href="#" class="btn toggle-dropdown" aria-label="Toggle font settings"><i class="fa fa-font"></i>
</a>
<div class="dropdown-menu font-settings">
<div class="dropdown-caret">
<span class="caret-outer"></span>
<span class="caret-inner"></span>
</div>
<div class="buttons">
<button type="button" id="reduce-font-size" class="button size-2">A</button>
<button type="button" id="enlarge-font-size" class="button size-2">A</button>
</div>
<div class="buttons font-family-list">
<button type="button" data-font="0" class="button">Serif</button>
<button type="button" data-font="1" class="button">Sans</button>
</div>
<div class="buttons color-theme-list">
<button type="button" id="color-theme-preview-0" class="button size-3" data-theme="0">White</button>
<button type="button" id="color-theme-preview-1" class="button size-3" data-theme="1">Sepia</button>
<button type="button" id="color-theme-preview-2" class="button size-3" data-theme="2">Night</button>
</div>
</div>
</div>
<!-- Actions Right -->
<div class="dropdown pull-right">
<a href="#" class="btn toggle-dropdown" aria-label="Toggle share dropdown"><i class="fa fa-share-alt"></i>
</a>
<div class="dropdown-menu font-settings dropdown-left">
<div class="dropdown-caret">
<span class="caret-outer"></span>
<span class="caret-inner"></span>
</div>
<div class="buttons">
<button type="button" data-sharing="twitter" class="button">Twitter</button>
<button type="button" data-sharing="google-plus" class="button">Google</button>
<button type="button" data-sharing="facebook" class="button">Facebook</button>
<button type="button" data-sharing="weibo" class="button">Weibo</button>
<button type="button" data-sharing="instapaper" class="button">Instapaper</button>
</div>
</div>
</div>
<a href="#" target="_blank" class="btn pull-right google-plus-sharing-link sharing-link" data-sharing="google-plus" aria-label="Share on Google Plus"><i class="fa fa-google-plus"></i></a>
<a href="#" target="_blank" class="btn pull-right facebook-sharing-link sharing-link" data-sharing="facebook" aria-label="Share on Facebook"><i class="fa fa-facebook"></i></a>
<a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Share on Twitter"><i class="fa fa-twitter"></i></a>
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="index.html" >Practical OpenLayers 3 & Leaflet1111</a>
<a href="https://dothanhlong.org/" target="_blank">Đỗ Thành Long</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1">
<div class="page-inner">
<section class="normal" id="section-gitbook_1">
<h2><a href="https://dothanhlong.org/" target="_blank">Đỗ Thành Long</a></h2> | Tài liệu Học <b>OpenLayers và Leaflet</b> được mình sưu tầm, thông tin chi tiết như bên dưới^^
<h1 id="practical-openlayers-3--leaflet">Practical OpenLayers 3 & Leaflet</h1>
<p>A hands on introduction to using <a href="http://ol3js.org/" target="_blank">OpenLayer 3 (OL3)</a> and <a href="http://leafletjs.com/" target="_blank">Leaflet</a> to display spatial data on the web. The workshop will introduce the two libraries, the underpinning concepts and strengths of each, and take delegates through creating a series of examples.</p>
<p>Documentation: <a href="index.html" target="_blank">http://astuntechnology.github.io/osgis-ol3-leaflet/</a><br>Repository: <a href="https://github.com/AstunTechnology/osgis-ol3-leaflet" target="_blank">https://github.com/AstunTechnology/osgis-ol3-leaflet</a> </p>
<h2 id="what-we-will-build">What we will build</h2>
<p>The workshop walks through building the same simple web mapping application first using OpenLayers 3 and then with Leaflet. The steps break down as follows:</p>
<ul>
<li>Basic map with OSM tiles</li>
<li>OS-GB Map with Ordnance Survey tiles</li>
<li>GeoJSON layer with markers<ul>
<li>Info for GeoJSON layer</li>
</ul>
</li>
<li>WMS layer<ul>
<li>Info for WMS layer</li>
</ul>
</li>
</ul>
<p>Completed versions can be seen here:</p>
<ul>
<li><a href="ol3/ol3-complete.html" target="_blank">OpenLayers 3 version</a></li>
<li><a href="leaflet/leaflet-complete.html" target="_blank">Leaflet version</a></li>
</ul>
<h2 id="getting-started">Getting started</h2>
<h3 id="get-a-copy-of-the-repository">Get a copy of the repository</h3>
<p>First clone or download (and unzip) <a href="https://github.com/AstunTechnology/osgis-ol3-leaflet" target="_blank">the repository from GitHub</a> to a suitable location on your local machine.</p>
<pre><code>git clone https://github.com/AstunTechnology/osgis-ol3-leaflet.git
</code></pre><p>If you are using your own machine then you should be good to go, <a href="ol3/README.html">start building an OpenLayers 3 map</a>.</p>
<h4 id="osgeo-live-dvd">OSGeo Live DVD</h4>
<p>If you are using the <a href="http://live.osgeo.org/en/" target="_blank">OSGeo Live DVD</a> do the following:</p>
<ul>
<li>Dismiss the Welcome and Upgrade prompts</li>
<li>In Firefox (Applications > Web Browser) navigate to <a href="http://is.gd/osgis2014" target="_blank">http://is.gd/osgis2014</a></li>
<li>Copy and paste the commands displayed in your browser into a Terminal (Applications > Accessories > Terminal Emulator) and hit return</li>
</ul>
<p>The commands set the keyboard layout to GB, installs <code>git</code> and <code>gedit</code> (a slightly better text editor) then clones the repository and changes you into it's root. Now you're ready to <a href="ol3/README.html">start building an OpenLayers 3 map</a>.</p>
<hr>
<h2 id="extra-credit">Extra credit</h2>
<ul>
<li>Style markers based on an attribute value</li>
<li>Add additional WMS layer (the WMS server used in the workshop also has a <code>osgb:county_region</code> layer)</li>
</ul>
<h3 id="resources">Resources</h3>
<ul>
<li><a href="http://ol3js.org/" target="_blank">OpenLayers 3 website</a> and <a href="http://ol3js.org/en/master/apidoc/" target="_blank">API docs</a></li>
<li><a href="http://leafletjs.com/" target="_blank">Leaflet website</a> and <a href="http://leafletjs.com/reference.html" target="_blank">API docs</a></li>
</ul>
<h2 id="license">License</h2>
<p>This work is licensed under the Creative Commons Attribution 4.0 International
License. To view a copy of this license, visit
<a href="http://creativecommons.org/licenses/by/4.0/" target="_blank">http://creativecommons.org/licenses/by/4.0/</a>.</p>
<p>Third-party libraries bundled with this repository for convenience such as
OpenLayers 3, Leaflet, reqwest etc. retain their original license.</p>
<h2 id="todo">Todo</h2>
<ul>
<li>Consider adding Canvas example as suggested by @acanimal</li>
</ul>
</section>
</div>
</div>
</div>
<a href="ol3/README.html" class="navigation navigation-next navigation-unique" aria-label="Next page: OpenLayers 3"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="gitbook/app.js"></script>
<script src="https://cdn.mathjax.org/mathjax/2.0-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="gitbook/plugins/gitbook-plugin-mathjax/plugin.js"></script>
<script>
require(["gitbook"], function(gitbook) {
var config = {"fontSettings":{"theme":null,"family":"sans","size":2}};
gitbook.start(config);
});
</script>
</body>
</html>