-
Notifications
You must be signed in to change notification settings - Fork 47
/
simple.html
57 lines (53 loc) · 1.83 KB
/
simple.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
<html>
<head>
<title>Natural Earth - Javascript Shapefile and DBF Loader</title>
<script type="text/javascript" src="lib/binaryajax.js"></script>
<script type="text/javascript" src="src/binarywrapper.js"></script>
<script type="text/javascript" src="src/shapefile.js"></script>
<script type="text/javascript" src="src/dbf.js"></script>
<script type="text/javascript" src="src/map.js"></script>
<script type="text/javascript" src="src/layer.js"></script>
<!--[if IE]><script src="lib/excanvas.js"></script><![endif]-->
<script type="text/javascript">
window.onload = function() {
var map = new Map('map', [
// country shapes
new Layer('naturalearthdata/cultural/110m-admin-0-countries', { fillStyle: '#fadfa8', strokeStyle: '#5c3d1f', lineWidth: '0.5' }),
// dots for cities
new Layer('naturalearthdata/cultural/110m-populated-places', { fillStyle: '#800000', /*textHalo: '3', textStroke: 'white',*/ textFill: 'rgba(0,0,0,1)', textProp: 'Name_Town', font: 'bold 11px sans-serif' })
]);
}
</script>
<style type="text/css">
body {
background-color: #eee;
color: #000;
font: 12px sans-serif;
margin: 20px;
}
#map {
width: 1024px;
height: 512px;
margin: 0;
padding: 0;
border: 0;
background-color: #9dc3e0;
}
canvas {
margin: 0;
padding: 0;
}
a img {
border: 0;
}
</style>
</head>
<body>
<h1>Natural Earth</h1>
<p>This is an experimental javascript shapefile viewer. For no reason in particular it doesn't really work in IE, sorry. Elsewhere, uninformative errors may appear in the dark crevices of your browser.</p>
<p>See <a href="http://github.com/RandomEtc/shapefile-js">http://github.com/RandomEtc/shapefile-js</a> for more details.</p>
<h2>110m Cultural Vectors (2 layers)</h2>
<div id="map"></div>
<p><a href="http://www.naturalearthdata.com/"><img src="naturalearthdata/NEV-Logo-Black_sm.png"></a></p>
</body>
</html>