-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsocial.html
74 lines (64 loc) · 1.93 KB
/
social.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="src/leaflet.social.css" />
<style type='text/css'>
#map {
position: absolute;
top:0;
left: 0;
right: 0;
bottom:0;
}
.help {
font-size: 1.5em;
position: absolute;
top:0;
left: 0;
right: 0;
height: 30px;
z-index: 10;
background-color: rgba(0,0,0,0.5);
color: white;
padding: 10px;
margin: 0px;
text-align: center;
}
.help a.sources {
float: left;
margin-left: 50px;
color: white;
}
.help a.logo {
float: right;
}
.help a.logo img {
height: 30px;
}
</style>
</head>
<body>
<p class="help">Share map on social networks
<a class="sources" href="http://github.com/makinacorpus/Leaflet.Social/">Sources</a>
<a class="logo" href="http://makina-corpus.com"><img src="http://depot.makina-corpus.org/public/logo.gif"/></a>
</p>
<div id="map"></div>
<script type='text/javascript' src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script type='text/javascript' src="src/leaflet-hash.js"></script>
<script type='text/javascript' src="src/leaflet.social.js"></script>
<script type='text/javascript'>
window.onload = function() {
var map = L.map('map')
.setView([-16.4736, -151.7475], 13);
L.hash(map);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.control.social({default_text: "Guess where I am"})
.addTo(map);
}
</script>
</body>
</html>