-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathindex.html
62 lines (55 loc) · 2.85 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
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Example - asmaloney.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha384-VzLXTJGPSyTLX6d96AxgkKvE/LRb7ECGyTxuwtpjHnVWVZs2gp5RDjeM/tgBnVdM"
crossorigin="anonymous"
/>
<script
src="https://unpkg.com/[email protected]/dist/jquery.min.js"
integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK"
crossorigin="anonymous"
></script>
<script
src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha384-RFZC58YeKApoNsIbBxf4z6JJXmh+geBSgkCQXFyh+4tiFSJmJBt+2FbjxW7Ar16M"
crossorigin="anonymous"
></script>
</head>
<body>
<h1>Leaflet Example</h1>
<p>Here's an interactive map indicating the countries I've either lived in or travelled through for a month or more.
<div id="map" style="width: 800px; height: 440px; border: 1px solid #AAA;"></div>
<div>
<p>An example of how to use <a href="https://leafletjs.com/" target="_blank">Leaflet</a>.
<p>From the article <a href="https://asmaloney.com/2014/01/code/creating-an-interactive-map-with-leaflet-and-openstreetmap" target="_blank">Creating An Interactive Map With Leaflet and OpenStreetMap</a>
<p>Andy Maloney // <a href="https://asmaloney.com" target="_blank">asmaloney.com</a>
<br/>23 Jan 2014
<p>
<b>[06 May 2021]</b>
<ul>
<li>Updated to Leaflet 1.7.1, and jQuery 3.6.0.</li>
<li>All files reformatted with <a href="https://prettier.io/">prettier</a>.</li>
<li>Use <i>https</i> for URLs.</li>
</ul>
</p>
<p><b>[08 Oct 2019]</b>
<ul>
<li>Updated to Leaflet 1.5.1 and jQuery 3.4.1.</li>
<li>Added <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity">Subresource Integrity</a> to CSS and CDN JavaScript.</li>
<li>Changed the marker file from .json to .js since it is actually a JavaScript file.</li>
<li>Added a new country to the list :-)</li>
</ul>
<p><b>[16 Jul 2016]</b> Switched to Leaflet 0.7.7.
<p><b>[12 Jul 2016]</b> MapQuest discontinued the tile set I was using, so I switched to OpenStreetMap’s tiles. Note that these are useful only for testing. They say on their site:
<blockquote>"Apart from very limited testing purposes, you should not use the tiles supplied by OpenStreetMap.org itself."</blockquote>
<p><b>[19 Apr 2014]</b> Added <i>http:</i> to the scheme-less ajax.googleapis.com URI so double-clicking this file to open in the browser works.
</div>
<script type='text/javascript' src='maps/markers.js'></script>
<script type='text/javascript' src='maps/leaf-demo.js'></script>
</body>
</html>